Book a Demo

Author Topic: SQL server IDENTITY column  (Read 5088 times)

Ed Vowles

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
SQL server IDENTITY column
« 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

Ed Vowles

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: SQL server IDENTITY column
« Reply #1 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

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: SQL server IDENTITY column
« Reply #2 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.
No, you can't have it!

Ed Vowles

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: SQL server IDENTITY column
« Reply #3 on: January 30, 2009, 03:48:03 am »
Thanks Midnight