Within my database (SQL2008), I have a customer table and a country table (among others) and there is a foreign key relationship defined in the database between these tables based upon "Country.Id -> Customer.CountryId".
I have created an EF model using VS2010 RC and built this model from the database. When generating the model, I selected to include foreign key properties.
After building the model, I selected a number of properties in the "Customer" object, right clicked and selected "Refactor into New Complex Type" which I named "Address". One of the properties that I selected was the CountryId property (actually, it was all of the address properties but I doubt that matters).
Now, when I save the model, I get the error shown above, "There is no property with name 'CountryId' defined in type referred by Role 'Customer'." I know I broke it, but I cannot work out how to fix it again. I can tell you that the "Country" navigation property remains on the Customer object (probably should have included this in the "Address" object too but cannot see how to add this now that I have created the complex type.
I welcome your suggestions!