state « Interceptor « JPA Q&A





1. Interceptor state changes not picked up by joined subclass    forum.hibernate.org

Hullo, I've implemented an Interceptor to apply audit values (e.g. createdBy, createdDate). When a joined subclass entity is persisted the parent table record gets the audit values applied by the Interceptor but the child table record does not and in my case a not-null integrity constraint violation occurs. If I set the audit fields on the entity object before persisting, effectively ...

2. Order of state arrays in Interceptor methods    forum.hibernate.org

3. Changing state in an Interceptor?    forum.hibernate.org

Hi, Are Interceptors allowed to change the state of other objects in a graph that is being persisted? Here is what I'd like to do: Whenever a dirty object is persisted, I'd like to update its parent object (even if it wasn't dirty previously) and have these changes automatically persisted, as well. obviously, this assumes that Hibernate will persist child objects ...