Mapping to a table which does not have a primary key
posted 6 years ago
An entity without a primary key in a relational database is invalid. If you can you should add a surrogate key to it. If you can't you can map every field as a composite key, though this will mean your entity can't support duplicates any more.