Primary Identifier Mapping

Columns of primary keys should be mapped to persistent attributes. Like primary keys for tables, you need to set these persistent attributes as primary identifiers of entity classes. The mapped primary keys should be primary keys of primary tables.

There are three types of primary identifier mapping:

Primary identifier mapping is mandatory for entity classes.