Last post Sep 30, 2009 08:22 AM by xaeryan
Sep 29, 2009 02:53 PM|xaeryan|LINK
I have an entity with two tables, and the relationship between them is 0..1 to Many. Easy enough, this works fine, and the Add New Entity Data Model took care of it all for me.
However, I'd like to split the main table into two separate entities. Also easy enough, following this guide: http://blogs.msdn.com/adonet/archive/2008/12/05/table-splitting-mapping-multiple-entity-types-to-the-same-table.aspx
But now I'd like to shift the relationship from the first entity to the newly created second entity.
When I try this, I get a runtime error each time I try to load any of the pages:
EDMTest.App_Code.NOREP.msl(6,10) : error 3015: Problem in mapping fragments starting at lines 6, 17, 26, 31, 39:Foreign key constraint 'FK_NOREP_Options_Considered_NOREP' from table NOREP_Options_Considered (Doc_Key) to table NOREP (Doc_Key):: Insufficient
mapping: Foreign key must be mapped to some AssociationSet on the conceptual side.
Any ideas what I'm doing wrong? The picture links along the way have the Mapping Details and Properties window open on the associations, to make it easier to find my flaw.
Sep 30, 2009 08:18 AM|sjnaughton|LINK
This is an Entity Framework issue you will nodoubt get a quicker answer there
Sep 30, 2009 08:22 AM|xaeryan|LINK
Hmmm, never came across that one before. Thanks Steve, I'll give it a shot!