Given that you have a lot of domain objects, that all interact with one another, it would be very useful to know which objects have changed in a particular transaction.
Is this possible ? I would like to essentially do this :
public void someBusinessLogicMethod(someparams) {
Session s = getSession();
Transaction tr = s.beginTransaction()
domainObject = s.load(...)
domainObject.setSomethingOrOther(...);
domainObject.getSomeLink().setSomethingElse(...);
callSomeOtherBusinessLogicMethod();
tr.commit();
/* at this point many objects have changed, Hibernate knows which ones */
for (Object s : tr.getAffectedObjects(?)) {
....
}
}
Does this exist ?