Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Ed Vowles on January 28, 2009, 08:14:47 pm

Title: SQL server IDENTITY column
Post by: Ed Vowles on January 28, 2009, 08:14:47 pm
I would like to use enterprise architect to set a column on a table as an identity column (SQL server 2005). When I generate the table DDL I would like output to include the IDENTITY keyword. Something like:

Code: [Select]
CREATE TABLE Customer (
      ID int IDENTITY NOT NULL,
      Name nvarchar(50) NOT NULL,
)
;

Is this possible?!

Thanks
Ed
Title: Re: SQL server IDENTITY column
Post by: Ed Vowles on January 28, 2009, 08:46:57 pm
I think I may have answered my own question:

Element menu -> attributes -> select column -> column properties -> auto number

Is this documented in any of the online resources? I'd like to read up on how enterprise architect maps tables in its data model to SQL server scripts.

Ed
Title: Re: SQL server IDENTITY column
Post by: «Midnight» on January 28, 2009, 10:28:31 pm
This used to be documented, and I've not heard of changes.

What documentation there is on how EA maps diagrams to SQL is somewhat scattered. AFAIK there is no combined section on what goes where when DDL is generated. Unfortunately the DDL generation process is a black box, there is nothing like the code generation framework that we can hook into.

Make feature requests, and perhaps these will (finally, someday) rise high enough on the priority list that Sparx will (can) take action.
Title: Re: SQL server IDENTITY column
Post by: Ed Vowles on January 30, 2009, 03:48:03 am
Thanks Midnight