Association Mappings

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Will Smith
Posts: 7
Joined: Wed 27 Feb 2008 04:54

Association Mappings

Post by Will Smith » Thu 28 Feb 2008 16:37

Note: This is not a bug report. Simply a nice to know.

The OraDirect EDM Wizard automatically maps all of the columns (of supported types) to Entity properties. This is great. The issue is when you want to add Assocations between two entities.

After you create the association and set the mapping (in the Mapping Details) everything seems fine. Not until runtime do you discover something is wrong:
error 3007: Problem in Mapping Fragment(s) starting at line(s) (12, 32): Non-primary-key column(s) [FK_ISO_ID] being mapped in both fragments to different C-side properties - data inconsistency is possible since the corresponding C-side properties can be independently modified
The meaning behind this error is that an Entity property cannot be mapped to both an association and a column in a table. If you want the association, you need to remove the scalar property that references the same column.

Hope this helps someone.

Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 28 Feb 2008 17:11

Thank you for your suggestion.
We are working on it.
As you may have known Entity Framework is still in its beta stage.
Currently we support major functionality.
We'll greatly improve Visual Studio 2008 DDEX and Entity Framework interaction in the next build, which is planned to issue in three weeks.

Post Reply