RIA Services - Many to Many

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
RobIntechnica
Posts: 33
Joined: Tue 09 Feb 2010 11:42
Location: Manchester, UK

RIA Services - Many to Many

Post by RobIntechnica » Tue 25 May 2010 17:10

Hi

I'm Using RIA Services PDC 2009 to query my dotConnect for Oracle entity diagram, but I can't seem to access a many to many relationship. It works fine for one to many on the client. Many to many works on the server though.

In domain service on server this is fine:-

Code: Select all

 private void Test()
        {
            XYZ_FILE file = new XYZ_FILE();

            var x = file.XYZ_FOLDER;

        }
        
In Silverlight client this gets an error on the 2nd line:-

Code: Select all

 private void Test()
        {
            XYZ_FILE file = new XYZ_FILE();

            var x = file.XYZ_FOLDER;

        }

Error 7 'XYZDataModel.XYZ_FILE' does not contain a definition for 'XYZ_FOLDER' and no extension method 'XYZ_FOLDER' accepting a first argument of type 'XYZDataModel.XYZ_FILE' could be found (are you missing a using directive or an assembly reference?)

What could be the problem? Thanks

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

Post by AndreyR » Fri 28 May 2010 08:33

Unfortunately, there is no support for many-to-many relationships in RIA Services. Take a look at this link.
I recommend you to take a look at this article. Hope this helps.

RobIntechnica
Posts: 33
Joined: Tue 09 Feb 2010 11:42
Location: Manchester, UK

Post by RobIntechnica » Fri 28 May 2010 08:40

Thanks very much for the links. Adding to the many to many wasn't a problem, it was only when I came to delete. I've worked round this by enabling cascade delete at the database level and altered the relationship in the model to reflect this.

I'll try the adding an extra column approach if I need this in future.

Post Reply