pb16385 wrote:
We talked to Christian Baurer in Barcelona about this problem, and he agreed with us that such an API (session.isDirty(pojo)) is useful.
Other potential
Session methods closely related to the suggested
isDirty(pojo) that could be really useful for an application would be:
* Is a specified attribute dirty:
Code:
isDirty(Object pojo, String attributeName): boolean
* What is the old (loaded) value of an attribute:
Code:
getLoadedValue(Object pojo, String attributeName) : Object
* possibly also; What is the old (loaded) state of an object:
Code:
getLoadedValue(Object pojo): Object
Since this information is available to Hibernate, it seems unnecessary to have to keep track of this information separately.