Wiki Link: [discussion:1989]
Can't get it to work. 

Jul 6 2009 at 12:09 PM
I've created an extremely simple database, with 3 tables: Users, Products and a many-to-many table called Orders. Something like this:

Users 1 ----- * Orders * ------ 1 Products

Then I create the edmx, and I call the relationship ends "Ordered" and "OrderedBy" respectively. From the edxm I get the csdl and the other 2 files. Then I generate the adapter and the proxies, all fine. I also let the generator create the poco classes. User has an IList of Products called "Ordered", and Product has an IList of User called "OrderedBy".

I put everything together and it compiles. But when I run a simple create user test, I keep getting this error:

Test method EFPOCO.Test.EFPOCOTest.TestMethod1 threw exception: System.ArgumentException: Metadata information for the relationship 'Ordered' could not be retrieved. Make sure that the EdmRelationshipAttribute for the relationship has been defined in the assembly.
Parameter name: relationshipName.

But this is rather strange, since my adapter, proxies and POCO are generated from the metadata files... seems kind of senseless. Or maybe I'm doing something wrong?


Updating...
Page view tracker