Author: ASP.NET Debugging | Posted on: 7/26/2010 2:54:56 PM | Views : 1006

If you try to build a WCF RIA Application and the Entity Model (EM) doesn’t include foreign key information you will get an error like:
Unable to retrieve association information for association ‘MyModel.MyAssociation’. Only models that include foreign key information are supported. See Entity Framework documentation for details on creating models that include foreign key information.
There are three ways to get around this error.
If you are creating the model from a database, be sure to check the “Include foreign key columns in the model” setting when generating the model from the database. If you are creating a model and will generate the database from the model and you are not creating a 1 to many association, then you have to double click on the association in the model.  This will bring up the Referential Constraint editor and allow you to add the foreign key details. ...

Go to the complete details ...