I have a many-to-many relationship in my database of objects A to B. When i create a domain service the metadata looks fine. A has a collections of Bs, B has a collection of As. So it is correct. However the *.g.cs file generated doesn't have the same relationship.
Is there a way to make it work? I googled some answer to actually generate objects for the association table but i am curious if i can avoid this.
Thanks
We’ve also discussed how to approach your physical data model. You’ve learned that many-to-many relationships in relational databases can be solved by implementing a junction table.
Conceptually, a many-to-many dimensional relationship in Analysis Services is equivalent to many-to-many relationships in a relational model, supporting the same kinds of scenarios. Common examples of many-to-many include: Students are enrolled in many courses; each course has many students.
Verify that all of the tables you plan to use in the many-to-many relationships are related in the DSV through primary key relationships. This is a requirement for establishing a link to the intermediate measure group in a subsequent step.
The many-to-many relationships between the intermediate fact table and both the dimension tables in the relationship and the intermediate dimension creates the many-to-many relationships between members of the primary dimension and measures in the measure group that is specified by the relationship.
In the current release/version of RIA Services, you'll need the association table. We will most definitely be looking into this of course for a future release.
That said, I think often many-to-many relationships often have some interesting data associated with the relationship and as such, the middle table often has a real use, rather than existing for the sake of existing.
Till MS implements it in RIA, you can use http://m2m4ria.codeplex.com/ We have used in one of our Silverlight/RIA projects for User/Role (many-to-many) relationship and worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With