Any progress on this? I'm having the same problem now.
I have a couple of tables, Employees and SecurityClearance. There are no relationships defined in the SQL Server database. They both have composite keys and I get this error when creating an association between the two.
Error 1 Error 111: Properties referred by the Principal Role DLPSSECL must be exactly identical to the key of the EntityType Model.DLPSSECL referred to by the Principal Role in the relationship constraint for Relationship Model.DLPSSECLDLEPEM. Make sure all the key properties are specified in the Principal Role. C:\Documents and Settings\simonb\My Documents\Visual Studio 10\Projects\WpfApplication1\WpfApplication1\Model1.edmx 1 1 WpfApplication1
Properties referred by the Principal Role SecurityClearance must be exactly identical to the key of the EntityType Model. SecurityClearance referred to by the Principal Role in the relationship constraint for Relationship Model. SecurityClearanceEmployee. Make sure all the key properties are specified in the Principal Role.
Employee
CompanyID (Int16) PK
EmployeeID (Int32) PK
SecurityClearance (string)
Other data fields...
SecurityClearance
CompanyID (Int16) PK
SecurityClearance (string) PK
Other data fields...
Association is between SecurityClearance and Employee (1 to Many).
Mappings:
Maps to Employee
SecurityClearance:
CompanyID : Int16 <-> CopmanyID : smallint (key field on Employee table)
SecurityClearance : String <->SecurityClearance : char (data field on Employee table)
Employee
CompanyID : Int16 <-> CopmanyID : smallint (key field on Emlpoyee table)
EmployeeID : Int32 <-> EmployeeID : int (key field on Employee table)
Is creating an association in the EDMX on composite keyed tables like this supported? I've tried it in both EF v3.5 and EF v4.0 in the VS2010 beta and get the same error message when running model validation.
Cheers,
Simon