I am trying to generate model for a MSSQL 2005 database that uses tableName_oid as pattern for primary keys.
When i select tables that have primary key constraints and i click ‘next’, Studio throws a message that “The column name IS_AUTOINCREMENT is not valid.” It only happens with tables that have primary key constraints (works if i drop the PK constraint).
Example of table that works fine:
CREATE TABLE
Estado
(
estado_oid UNIQUEIDENTIFIER,
codigo VARCHAR(2) COLLATE Latin1_General_CI_AS,
codigoTE VARCHAR(20) COLLATE Latin1_General_CI_AS NOT NULL,
nome VARCHAR(50) COLLATE Latin1_General_CI_AS,
ultimaAtualizacao DATETIME,
autorizado BIT
);
Example of table that does not work:
CREATE TABLE
TipoPassaporte
(
tipoPassaporte_oid UNIQUEIDENTIFIER NOT NULL,
codigo CHAR(1) COLLATE Latin1_General_CI_AS,
descricao VARCHAR(30) COLLATE Latin1_General_CI_AS,
ultimaAtualizacao DATETIME,
autorizado BIT,
CONSTRAINT PKTipoPassaporte PRIMARY KEY (tipoPassaporte_oid),
CONSTRAINT TipoPassaporteEK UNIQUE (codigo)
);