Like any other Java object, an entity has an object identity, but when it exists in the database it also has
a persistent identity. Persistent identity, or an identifier, is the key that uniquely identifies an entity
instance and distinguishes it from all the other instances of the same entity type. An entity has a
persistent identity when there exists a representation of it in the data store; that is, a row in a database
table. If it is not in the database then even though the in-memory entity may have its identity set in a
field, it does not have a persistent identity. The entity identifier, then, is equivalent to the primary key
in the database table that stores the entity state.
đang được dịch, vui lòng đợi..
