J
jxlang
We have a db with an address table that is related to a customer table,
serviceProvider table and a partners table. The relation to each is a 1 to
many as each can have multiple address types (billing, sales, ext). The
relation is from each table to the address table on the table ID to
AddressParentID and then ParentTypeID to identify the table the record is
related to. Does Entity Framework 3.5 or 4.0 support this and if so can I do
it in the gui or do I have to do it in the xml files?
Errors I get are
Foreign Key constraint 'FK_Contacts_ServiceProviders' has been omitted from
the storage model. Column 'ContactForID' of table
'KPNCircuitsModel.Store.Contacts' is a Foreign Key participating in multiple
relationships. A one-to-one Entity Model will not validate since data
inconsistency is possible.
Error 3007: Problem in Mapping Fragments starting at lines 306, 311:
Non-Primary-Key column(s) [ContactForID] are being mapped in both fragments
to different conceptual side properties - data inconsistency is possible
because the corresponding conceptual side properties can be independently
modified.
Table design
Address tbl
AddressID
AddressParentID
ParentTypeID
AddressTypeID
General address fields......
Customer tbl
CustomerID
General customer info......
serviceProvider tbl
ServiceProviderID
General ServiceProvider Info……
Partner tbl
PartnerID
General Partner Info…..
serviceProvider table and a partners table. The relation to each is a 1 to
many as each can have multiple address types (billing, sales, ext). The
relation is from each table to the address table on the table ID to
AddressParentID and then ParentTypeID to identify the table the record is
related to. Does Entity Framework 3.5 or 4.0 support this and if so can I do
it in the gui or do I have to do it in the xml files?
Errors I get are
Foreign Key constraint 'FK_Contacts_ServiceProviders' has been omitted from
the storage model. Column 'ContactForID' of table
'KPNCircuitsModel.Store.Contacts' is a Foreign Key participating in multiple
relationships. A one-to-one Entity Model will not validate since data
inconsistency is possible.
Error 3007: Problem in Mapping Fragments starting at lines 306, 311:
Non-Primary-Key column(s) [ContactForID] are being mapped in both fragments
to different conceptual side properties - data inconsistency is possible
because the corresponding conceptual side properties can be independently
modified.
Table design
Address tbl
AddressID
AddressParentID
ParentTypeID
AddressTypeID
General address fields......
Customer tbl
CustomerID
General customer info......
serviceProvider tbl
ServiceProviderID
General ServiceProvider Info……
Partner tbl
PartnerID
General Partner Info…..