Many to many relationships

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
rickblyth
Posts: 2
Joined: Thu 02 Jul 2009 09:35

Many to many relationships

Post by rickblyth » Tue 21 Jul 2009 15:06

Hi,

I'm using version 2.20.30 and have a query regarding many-to-many relationships.

In MS's entity design surface when I did an 'Update From Database' it would generate use the link entity behind the scenes via Associations. You can see more on this here http://weblogs.asp.net/zeeshanhirani/ar ... ework.aspx

However, given that there is no 'Update from DB' option in EntityDeveloper, how do I create this in your tool? Whenever I try I want to point the tool at the link entity somehow but I can only set Many to Many between the two parent entities and then I get an error saying Missing Table Mapping but can't map to the joining table it that makes sense?

Thanks in advance for your help,

Rick

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

Post by AndreyR » Wed 22 Jul 2009 11:28

The Update model from database functionality is present in our roadmap, but no timeframe can be provided.
In the current version, you can drop the entities from model (don't forget to remove the corresponding entities
from the Store part of the model) and then drag them from Database Explorer to the designer surface.
The model will contain the recent changes of these tables.

rickblyth
Posts: 2
Joined: Thu 02 Jul 2009 09:35

Post by rickblyth » Wed 22 Jul 2009 12:08

Thanks for the response but I know how to drag new entities on to the design surface. My question as above was how I can model Many to Many relationships in Entity Developer?

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

Post by AndreyR » Wed 22 Jul 2009 13:17

The many-to-many relationship is automatically built over tables connected with an intermediate table.
The intermediate table should contain only columns corresponding to the primary keys of the associated tables and it
should be associated by foreign key constraints to both tables you want to participate in the association.

Post Reply