in

The ORM Foundation

Get the facts!

Guid (uniqueidentifier) datatype, column case

Last post 07-02-2012 16:20 by Matthew Curland. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-16-2008 7:58

    • sensei
    • Top 150 Contributor
    • Joined on 05-12-2008
    • Posts 3

    Guid (uniqueidentifier) datatype, column case

    Hi

     Sorry if this has been asked before

     Just starting to do some minor ORM work with nORMa, previous Visio user.

    I dont care very much for "uniqueifiers" but unfortunetly they are sometimes necessary. Does nORMa support this datatype, I can't find it anywhere.

    Also I have tried to get the DDL generation to produce Capital column names without success, is it possible to change?

     

    Thanks for the great work

    Filed under: , , ,
  • 05-16-2008 21:28 In reply to

    Re: Guid (uniqueidentifier) datatype, column case

    Welcome to NORMA.

    We haven't yet included the UUID datatype, but we should eventually do so. This is a little harder than, say, bigint because not all generation targets support it. Also, we've currently built the autoincrement and identifier notions into a datatype, when in fact the notion of datatype and autogeneration need to be separated. We'll evaluate the cost of adding this next week, hopefully it won't be worse than tinyint (a recent addition).

    To change the column capitalization, open the 'Name Generation Settings' branch in the ORM Model Browser (Ctrl-W, Ctrl-M from the designer, or on the context menu), find the relational branch, then Column Specific. You'll see casing options in the Properties Window. Change it from the default (Camel) to Pascal.

    -Matt

  • 05-21-2008 6:46 In reply to

    • sensei
    • Top 150 Contributor
    • Joined on 05-12-2008
    • Posts 3

    Re: Guid (uniqueidentifier) datatype, column case

    Thanks Matt

     For now it's no big deal to manually change some surrogate datatype to UUID i the DDL.

     Again, thanks for the great effort with nORMa!

  • 05-21-2008 11:07 In reply to

    Re: Guid (uniqueidentifier) datatype, column case

    Hello Sensei,

    I'd think the Numeric Auto Counter type would work well as a surrogate.  You'll have a one-to-one for matching to UUID type, and will have the same (actually theortically better), assurance of uniquness (within the data structure).  That should make the process of coverting to UUID easier.  One thing I'd check on is to see if your target DBMS has an integer to UUID conversion procedure already - and save that bit of work.

    I can see the point of your request for a native UUID type, though; if it's important to the conceptual model to make that distinction - or just to automate the process.

    One thing you get from the nORMa team, is that there are a lot of features they plan to add (or are willing to add on request), but it's just a matter of time.

    BRN..

    Filed under: ,
  • 07-02-2012 12:51 In reply to

    • Tyler Young
    • Top 10 Contributor
      Male
    • Joined on 08-27-2009
    • South Jordan, Utah, USA
    • Posts 49

    Re: Guid (uniqueidentifier) datatype, column case

    Just a quick follow-up... did UUID ever make it into NORMA? I'm doing a bit of work where we're using UUIDs in SQL Server 2008, and at the moment I'm just doing a search / replace in the generated script. My next step will be to customize our output transform, but it'll just be a dirty hack.
    Filed under:
  • 07-02-2012 16:20 In reply to

    Re: Guid (uniqueidentifier) datatype, column case

    Hi Tyler,

    Haven't done this one. The issue isn't so much SQL server, it is that (AFAIK) UUID is not a standard SQL datatype and not all of the generation targets support it.

    I suggested a modification to the generator files at http://www.ormfoundation.org/forums/p/601/1835.aspx#1835. Basically, you hijack another data type based on a bogus facet info (I used DECIMAL with precision 1000). I'm not sure what else SQL Server needs to make this auto-generate for an IDENTITY column.

    -Matt

Page 1 of 1 (6 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service