Modify « Interceptor « JPA Q&A

1. Modify other states in Interceptor

2. Interceptor.postFlush: how to modify state after persistence

Hibernate version: 3.2.2 I'm using a session-scoped Interceptor to convert all timestamp attributes to UTC before persisting (in onSave, onFlushDirty methods). Works fine. However, the in memory object after persistence needs to reflect the original timestamp values (in their original timezone). To achieve this I tried the following in postFlush: Code: public void postFlush(Iterator entities) { ...