About getIdentifier
JPA Primary Key
Explains how to define and use primary keys in JPA, including composite and embedded primary keys.... ( ) ; Object projectId = util. getIdentifier getIdentifier(entity) PersistenceUnitUtil's method Return the id of ...
getIdentifier(entity)
Return the id of the entity.(Method of javax.persistence.PersistenceUnitUtil)
javax.persistence.PersistenceUnitUtil
Utility interface between the application and the persistence provider managing the persistence unit.(Interface of JPA)
Entity listener - event instead of object
Hi, Currently I'm playing with entity listener to implement auditing with difference between values in updated entity. There is a problem however with accessing "old" version of object stored in database. I can't find the nice way to use EntityManager in EntityListener. Because of that, I can't store separate entity for given event. Right now I'm using BaseEntity which contains ... ) ? event. getPersister ( ) . getIdentifier ( event. getEntity ( ) , event. ...