Hibernate Team |
|
Joined: Tue Aug 26, 2003 3:00 pm Posts: 1816 Location: Austin, TX
|
This can be accomplished via the Interceptor.onFlushDirty() method. When the session is being flushed, this will get called for each object that Hibernate found to be dirty within the bound of the session.
There is not currently a way to ask a Hibernate Session if it considers a particular object instance dirty through the public APIs. If you really really really want to do this, you can take a look at the SessionImpl class to see how it does it, and then replicate that logic yourself; but I would recommend the Interceptor approach.
|
|