I have some entities created at an ERD diagram, both tables have a column marked as identity but the generated SQL for SQL Server shows the identity only for some of the tables.
An example follows:
Here cmnCountries have the column cmnCOU_UID marked as identity and the generated SQL is correct, but for cmnStates, cmnSTA_UID is marked but the SQL code does not have it.
Please note these tables does not form part of any relationship (no foreing keys).
create table dbo.cmnStates (cmnCOU_UID int not null, cmnSTA_UID int not null, cmnSTA_Name varchar(60) not null, cmnSTA_ShortName varchar(25) null, constraint PK_cmnSTA primary key (cmnCOU_UID, cmnSTA_UID));
create table dbo.cmnCountries (cmnCOU_UID int identity not null, cmnCOU_ANSICode char(2) not null, cmnCOU_Name varchar(60) not null, cmnCOU_ShortName varchar(25) null, constraint PK_cmnCOU primary key (cmnCOU_UID));
I have triple-checked and the design of the entities is correct on both cases.
Can somebody please help me?
Thanks in advance