Thanks for response,
So, if I have a class
public class foo{
String id;
String state;
Bar myBar; // many-to-one
... getters and setters...
}
If my instance in the cache have :
id = "THISONE"
state = "unmodified"
myBar = "someBarWithIdEquals1"
and in the database there is an update of the foo :
id = "THISONE"
state = "justModified"
myBar = "anotherBarWithIdEquals2"
Now, I call session.find("From Foo");
and then if I call session.load(Foo.class, "THISONE");
do I get this :
id = "THISONE"
state = "justModified"
myBar = "null" (that will be fill with "anotherBarWithIdEquals2" when I call the getter)
?
Joe
|