Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Unassigned: Designer (v12): Reverse-engineer Northwind.mdf with "include FK" unchecked. [1081]

$
0
0
1. Create new C# project
2. Add EDMX
3. Choose db-first and connect to Northwind.mdf (attached)
4. Uncheck "include foreign key columns in the model" and select all tables
5. Press "finish"

Expected:
Model is imported, no errors. Model can build.

Actual:
Model is imported, and an error prevents build:

Error 2010: The Column 'ShipperID' specified as part of this MSL does not exist in MetadataWorkspace.

__Update__

I was also able to repro this issue by creating a simple model with two tables and a many-to-many join table. (As long as the foreign keys and primary keys have different names, this repros.)
Comments: Fix for https://entityframework.codeplex.com/workitem/1081 (Designer (v12): Reverse-engineer Northwind.mdf with "include FK" unchecked) - for many to many relationships we created association set mappings that mapped a primary key property on a CSpace entity type to the primary key column of the corresponding SSpace entity type instead to the corresponding key column on SSpace entity for the join table. This "worked" in cases where the key property on the SSpace entity was the same as the foreign key property on the join table because we would use the mapping only to write MSL but once the property names were different we would write an invalid MSL. Change 668bc26 in the designer repo.

Viewing all articles
Browse latest Browse all 10318

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>