diff --git a/bin/typeorm-model-generator b/bin/typeorm-model-generator old mode 100644 new mode 100755 diff --git a/src/drivers/MssqlDriver.ts b/src/drivers/MssqlDriver.ts index 329a848..34ce9b5 100644 --- a/src/drivers/MssqlDriver.ts +++ b/src/drivers/MssqlDriver.ts @@ -83,7 +83,7 @@ WHERE TABLE_TYPE='BASE TABLE' and TABLE_SCHEMA in (${schema}) AND TABLE_CATALOG }[] = ( await request.query(`SELECT TABLE_NAME,TABLE_SCHEMA,COLUMN_NAME,COLUMN_DEFAULT,IS_NULLABLE, DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE, - COLUMNPROPERTY(object_id(TABLE_NAME), COLUMN_NAME, 'IsIdentity') IsIdentity, + COLUMNPROPERTY(object_id(CONCAT(TABLE_SCHEMA,'.', TABLE_NAME)), COLUMN_NAME, 'IsIdentity') IsIdentity, (SELECT count(*) FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc inner join INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE cu