Entity Framework Multiple associations to a table causes error 3033
Posted
by taylonr
on Stack Overflow
See other posts from Stack Overflow
or by taylonr
Published on 2010-04-13T14:57:08Z
Indexed on
2010/04/13
16:13 UTC
Read the original article
Hit count: 433
entity-framework
|.NET
I'm using EF 3.5 SP1.
I have 3 tables:
- Pendants
- PendantAccessories
- PartsData
Basically #1 and 2 are used for product selection, so #1 has a "Number of Buttons" property and other options. #2 has fields like "Cable Type" etc.
The third table contains property information for all of our parts, such as what plant it's manufactured in, it's weight etc.
What I'm trying to do is set up an association between #1 and #3 and also between #2 and #3. The PK in all 3 tables is the PartNumber.
I set it up between #2 and 3 by going into Mapping Details and adding a Maps to PartsData and mapping the columns. Everything worked good.
I then tried the same thing between #1 and 3.
However, now when I compile I get "Error 3033: Problem in Mapping Fragment starting at line 713: EntitySets 'pendants' and 'pendantAccessories' are both mapped to the table 'PartsData'. Their Primary Keys may collide."
Does anyone know what I'm doing wrong here?
© Stack Overflow or respective owner