You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.
I have three entity classes: A, B, C.
A contains list of B (OneToMany, Lazy)
B contains A (ManyToOne, lazy)
B contains list of C (OneToMany, Lazy)
C contains B (ManyToOne, lazy)
All entities have their POJOs to which they're converted after retrieve.
When retrieving them, ODirtyManager class marks entity being retrieved as dirty when resolving foreign keys. However ODirtyManager is not cleared for retrieved entity. So on next retrieve and an attempt to save same entity often actual save is overriden by older copy of same entity held by ODirityManager (set are used, so I guess that's why outcome is random).
My test do (and refreshes objects after each read):
addBtoA(a, b1);
addBtoA(a, b2);
addCtoB(b1, c1);
addCtoB(b1, c2);
addCtoB(b2, c3);
addCtoB(b2, c4);
and finally sets boolean value on c to true.
setTest(c1, true);
Tests randomly fails at different stages, rarely passes. When using OrientDBObject with same entity classes issue does not happen.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have three entity classes: A, B, C.
A contains list of B (OneToMany, Lazy)
B contains A (ManyToOne, lazy)
B contains list of C (OneToMany, Lazy)
C contains B (ManyToOne, lazy)
All entities have their POJOs to which they're converted after retrieve.
When retrieving them, ODirtyManager class marks entity being retrieved as dirty when resolving foreign keys. However ODirtyManager is not cleared for retrieved entity. So on next retrieve and an attempt to save same entity often actual save is overriden by older copy of same entity held by ODirityManager (set are used, so I guess that's why outcome is random).
My test do (and refreshes objects after each read):
addBtoA(a, b1);
addBtoA(a, b2);
addCtoB(b1, c1);
addCtoB(b1, c2);
addCtoB(b2, c3);
addCtoB(b2, c4);
and finally sets boolean value on c to true.
setTest(c1, true);
Tests randomly fails at different stages, rarely passes. When using OrientDBObject with same entity classes issue does not happen.
The text was updated successfully, but these errors were encountered: