R – Many-to-many relationship in .NET RIA services

silverlightwcf-data-services

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

Best Answer

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.

Related Topic