Beginner |
|
Joined: Thu Apr 27, 2006 12:19 pm Posts: 33 Location: Seattle, WA
|
Unfortunately there isn't a method like: session.getDirtyObjects(). It appears to me that Hibernate figures out which objects are dirty at the identitymap level during a flush. What I've done before is fixed up all the setters of my classes, for example:
private boolean changed = false;
private String firstName;
public void setFirstName(String firstName)
{
setChanged(this.firstName != firstName);
this.firstName = firstName;
}
protected void setChanged(boolean changed)
{
if (changed)
this.changed = changed;
}
|
|