3

I'm using SqlMetal to generate a map of the DB in C# against the developing environment DB. The generated file has 1,89MB.

SqlMetal /server:<ip> /database:<dbname> /user:<dbuser> /password:<pass> /code:DBO.cs /namespace:<namespace>

In order to have more recent data on the developing environment I backup the production environment DB and restore it to the developing machine.

Now, when I run the script that uses SqlMetal, there's one association that SqlMetal chooses to ignore.

I have TableA with 9 FK, it only generates 8 Associations for that table. The association between TableA and TableB is missing.

Worse that that is that associations between other tables and TableB are working fine.

Any idea why it's only skipping associations between tableA and tableB?

Edit

TableB is called user. Maybe this happens because the table name is a sql reserved word.

4

0 回答 0