Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.2 branch
-
None
Description
First reported here: http://objectstyle.org/cayenne/lists/cayenne-user/2006/07/0020.html
A unit test to reproduce (part of InheritanceTst class):
public void testCAY592() throws Exception
{ createTestData("testManagerAddress"); List addresses = context.performQuery(new SelectQuery(Address.class)); assertEquals(1, addresses.size()); Address address = (Address) addresses.get(0); Employee e = address.getToEmployee(); // CAY-592 - make sure modification of the address in a parallel context // doesn't tmess up the Manager DataContext c2 = context.getParentDataDomain().createDataContext(); e = (Employee) DataObjectUtils.objectForPK(c2, e.getObjectId()); address = (Address) e.getAddresses().get(0); assertSame(e, address.getToEmployee()); address.setCity("XYZ"); assertSame(e, address.getToEmployee()); }