You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Robert Wruck (JIRA)" <ji...@objectstyle.org> on 2006/04/03 15:10:49 UTC
[OS-JIRA] Created: (CAY-489) performQuery overwrites local
modifications in toMany relationships
performQuery overwrites local modifications in toMany relationships
-------------------------------------------------------------------
Key: CAY-489
URL: http://objectstyle.org/jira/browse/CAY-489
Project: Cayenne
Type: Bug
Components: Cayenne Core Library
Versions: 1.1
Reporter: Robert Wruck
Here's my scenario:
I have an Object of class A that has a toMany relationship to B.
myA.getBList() returns a list of, say, 3 objects.
I locally add an instance of B:
myA.addToBList(myB);
Now, myA.getBList() returns a list of 4 objects.
If after that I perform a SelectQuery returning (among others) myA, myA.getBList() returns only the priginal 3 objects.
I haven't done a commit yet, so I do now. All 4 (!) objects are written to the DB and after restarting the application, myA.getBList() returns 4 objects again.
IMHO, performing a SelectQuery should not overwrite relationships of objects with PersistenceState.MODIFIED.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira