JMitchell wrote:
I removed the problem tables and added them back in afterwards. I still think this needs to be looked at though.
Every entity mapped onto a table requires to have 1 or more identifying fields. In v2.6 we didn't force that upon users, in v3 we do.
After a converted project you might fall into the trap that you can't refresh. So do the following:
- for the entities which give you this error, select 1 field and mark it as the identifying field. YOu can do that in project explorer, by right-clicking the field, or by opening the entity in the entity editor.
- click 'validate and adjust relational model data'. This will set the target field in the table information as PK.
You now have two options:
1) export the DDL SQL and apply it to the schema in your database. (recommended). This thus makes the table have a pk. You can now refresh OK.
or
2) set in project properties the setting 'IdentifyingFieldsFollowDBPrimaryKeyConstraints' to false. When you now refresh you'll get a dialog which shows you 3 options: export, abort or ignore the export. Click this last option. Then refresh normally.
The second option has the problem that you will have to manually assign PK fields. So it's recommended to have each table in your db to have a PK.
If you use these tables as readonly tables anyway, it might be a good idea to map a typedview on them instead of an entity (new in v3). The code you use in your project is a little different, but it doesn't force a PK on you, and as you use the data in a read-only fashion anyway, it's perhaps more fitting your domain.