I've two interceptors that are chained. The first determines whether or not an object is dirty (findDirty). The second one updates a specific field in all dirty objects (OnFlushDirty).
The problem is that the dirty check itself does not mark the field updated by the second one as dirty. As Hibernate does not recheck in this case, the changed field from the second interceptor never goes to the database.
The question now is, if that is by design and I'm doing something wrong or should hibernate be improved here, which would be my opinion.
The problematic code is: DefaultFlushEntityEventListener.handleInterception.
it only recalculates if the dirty check is not performed by a Handler..
|