I think I found a problem in updating the existing model from database.
Suppose I have 3 tables: EMPLOYEE, ADDRESS, DEPARTMENT. Suppose order can contain only one product. If I first create an Entity data model with just two tables EMPLOYEE and ADDRESS (or EMPLOYEE and DEPRATMENT, or add all three tables) everything is fine. If I first use EMPLOYEE and ADDRESS to create the model and then add ("Update model from database") one more table, I get the error 3007. I understand that a property (EMPLOYEE.DEPARTMENT_ID) that existed as a scalar property is now associated with a set (Deparment has many employees). Somehow, if I create the model with all three tables, all associations are generated correctly. If I add tables incrementally, I get the error. I compared the resulting edmx files (after heavy reordering the tags without changing the structure) and found that clearing two lines that refer to the scalar property solves the problem. Are you aware of this?
Thanks