Tako Schotanus wrote:
No he's talking about what would happen if you return persisted nodes
from
queries, more like you said below:
What you missed is that every time query will return the same transient
state,
so no A' and A'' will ever exist, and node A persisted with all changes.
If query return persistent state only you will see a bit different
behavior.
1) query repo for node with property P=steve
2) got node A with property P=steve
3) set node A property P=john (making it transient)
4) query repository for node with property P=john
5) got nothing
6) query repo for node with property P=steve
7) got node A' (since A is a transient at this moment) with property
P=steve
No, changing node A makes it A', remember it's different now from the
node A
that is persisted because you haven't saved it yet! So to change your
example:
If query return persistent state only you will see a bit different
behavior.
1) query repo for node with property P=steve
2) got node A with property P=steve
3) set node A property P=john (making it transient, resulting in node A')
4) query repository for node with property P=john
5) got nothing
6) query repo for node with property P=steve
7) got node A (the original from the store because A' is still transient)
with property P=steve
And what Marcel was trying to say was:
8) set node A property Q=test (making it transient, resulting in node A''
because it's not the same as the one in the store and also different from
A'? Or does something else happen?)
9) What happens when we call save() or refresh() on A' or A''?
refresh will do it's job per spec, no difference here.
Save will throw an exception when transient state has such conflict.
--
Ivan Latysh
[EMAIL PROTECTED]