Using EDML with RIA and Silverlight - Dual relationship

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Posts: 33
Joined: Tue 09 Feb 2010 11:42
Location: Manchester, UK

Using EDML with RIA and Silverlight - Dual relationship

Post by RobIntechnica » Tue 09 Feb 2010 18:15


I've been building a Silverlight application using dotConnect Oracle Entities and RIA Services.

This is working fine, provided all associations are named the same as the foreign keys that they're based on and that the Naming Rules are set to leave everything unchanged. Also, each association needs to be edited so that the Child Navigation Property does not have an 's' appended to it, which it does for some reason even though Naming Rules are set to unchanged.

Anyway, the only problem I've not been able to overcome is when tables have two relationships between each other. Because the first relationship has the Parent Navigation Property and Child Navigation Properties set to the exact physical table names, the second relationship cannot use these as well. If you try you get a message box saying:-

Association Editor
An item named 'USERS' already exists. Please choose a different name.

Is there any workaround for this. The error message when the second relationship doesn't have matching names is:-

Error 2 Association named 'REPORTS_USERS' defined on entity type 'ReportingDataModel.REPORTS' is invalid: ThisKey property named 'USER_ID' cannot be found.


Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 10 Feb 2010 14:46

Entity Framework validation does not allow to have the identical names for 2 associations, so this is designed behaviour.
As a solution I recommend you to implement special metadata classes like it is described in the
Associations section of the following article:

Post Reply