Uniquing broken
---------------
Key: CAY-503
URL: http://objectstyle.org/jira/browse/CAY-503
Project: Cayenne
Type: Bug
Components: Cayenne Core Library
Versions: 1.2 [BETA]
Reporter: Mike Kienenberger
Priority: Critical
I'm converting sets of data. I start with an empty database. During
one record set, I create a new contact record and I create a mailing
address and assign it to the contact. This is a to-one relationship.
This record set gets committed.
Later, I convert another record set with the same contact info. I
find the contact record in the database. I find the mailing address
in a separate database query. I then try to verify that this mailing
address is not in the existing contact -- this is where the situation
above was uncovered.
So basically:
create contact. create mailing address. associate. commit.
lookup contact. lookup mailing address. Change mailing address
description field. Compare to contact addresses.
At this point contact has one committed copy of mailing address while
the current mailing address is modified.
-----------------------
I changed things to avoid an unnecessary description field
modification. I still get the same problem, but now both objects are
in a committed state:
this= Address (id=179)
objectContext= DataContext (id=169)
objectId= ObjectId (id=181)
persistenceState= 3
snapshotVersion= -9223372036854770913
values= HashMap (id=182)
arg0= Address (id=76)
objectContext= DataContext (id=169)
objectId= ObjectId (id=191)
persistenceState= 3
snapshotVersion= -9223372036854770899
values= HashMap (id=192)
{<ObjectId:Address, ADDRESS_ID=1883>; committed;
[contactPhysicalAddressList=>?; contactMailingAddressList=>(..);
description=>Mailing; streetAddress=>660 Farmers Loop Rd. Fbks, Ak
99712; streetNumber=>null; zip=>null; contactOtherAddressList=>?;
city=>null; apt=>null]}
org.objectstyle.cayenne.access.DataContex..4d659d
{<ObjectId:Address, ADDRESS_ID=1883>; committed; [stateProvince=>?;
contactPhysicalAddressList=>?; contactMailingAddressList=>?;
description=>Mailing; streetNumber=>null; streetAddress=>660 Farmers
Loop Rd. Fbks, Ak 99712; zip=>null; contactOtherAddressList=>?;
city=>null; apt=>null]}
<ObjectId:Address, ADDRESS_ID=1883>
-- 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
This archive was generated by hypermail 2.0.0 : Wed Apr 12 2006 - 16:44:47 EDT