Page 1 of 1

Association Mappings

Posted: Thu 28 Feb 2008 16:37
by Will Smith
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.
Cheers,
Will

Posted: Thu 28 Feb 2008 17:11
by Alexey.mdr
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.