Let me start out by saying I have googled this problem for hours and searched this forum also.
I have a session factory scoped interceptor and can't seem to get the onFlushDirty, onDelete or onSave to ever fire, even though postFlush fires with all the entities that are persisted. beforeTransactonComplete also fires properly.
Is it possible that hibernate batching, batched versioned updates or some other feature would impact this?
I am not explicitely opening the session, but using the getCurrentSession() to implicitly open it, so I cannot specify the interceptor when the session is opened, which is why I am using the factory scoped version.
Conversely if someone can tell me what I can do in postFlush to know which entities are new, updated or deleted that would also solve my problem.
|