There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Power Tools: Wrong key mapping in the Reverse Engineer Code First
Ok, my Database is made on the Brazil originally in the IBM Informix, and i trying to migrate to SQL Server, i've copy the structure data (table, primary and foreign keys) via SQL script, and i doing a .net console application to migrate the data, so the
table and column names is not nice, and the relational keys are problematic, don't try understand what each table means.
So here is the thing; many columns are primary keys in the table one and consequently in the table two many columns are foreign keys, if the reverse engineer code first does not map correctly the primary keys or change the original database order of primary
keys mapping, so the code first entity table mapping is wrong, and if you execute the application without change the key mapping to the correct form you will get an ModelValidation Exception, because the foreign key mapping does not match to the primary key
The wrong key map is on the tabel notes_alim, it's inverting the columns t.alim_versao, t.alim_tp_documento
i'm not certain but i think there other tables mapping with the same behavior