Page 1 of 1

Many to many relationships

Posted: Tue 21 Jul 2009 15:06
by rickblyth
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

Posted: Wed 22 Jul 2009 11:28
by AndreyR
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.

Posted: Wed 22 Jul 2009 12:08
by rickblyth
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?

Posted: Wed 22 Jul 2009 13:17
by AndreyR
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.