Association between two tables where keys are different data types
Tables
- Departments
- Em开发者_C百科ployees
I'm trying to associate:
- Departments - dept_code : char(4)
- Employees - dept : varchar(4)
But I receive the following error,
Error 2039: The conceptual side property 'DEPT_CODE' has already been mapped to a storage property with type 'char'. If the conceptual side property is mapped to multiple properties in the storage model, make sure that all the properties in the storage model have the same type.
Other than changing the field's data type on the database side... Is there are workaround to this?
Just change the type. I would also change the name to either dept or dept_code for all tables so that it is consistent.
精彩评论