| Summary: | Same object referenced from both EM cache and shared cache | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Andrei Ilitchev <andrei.ilitchev> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Andrei Ilitchev
The bug is fixed as part of Bug 307433 - Regression in Auditing Support when using defaults. (rev. 8929). Note that for verification the two tests in fieldaccess.advanced.EntityManagerJUnitTestSuite testObjectReferencedInBothEmAndSharedCache_ObjectReferenceMappingVH and testObjectReferencedInBothEmAndSharedCache_AggregateObjectMapping should be run both with fieldaccess.advanced.Employee cache settings: the setting in fieldaccess.advanced.Employee definition: @Cache( ... coordinationType=SEND_NEW_OBJECTS_WITH_CHANGES ) and alternative: @Cache( ... coordinationType=INVALIDATE_CHANGED_OBJECTS ) The fix: In ObjectReferenceMapping class, mergeChangesIntoObject method: added: // if value holder is used, then the value holder shared with original substituted for a new ValueHolder. getIndirectionPolicy().reset(target); before the last line of that method: setRealAttributeValueInObject(target, targetValueOfSource); In AggregateMapping class in both mergeChangesIntoObject and mergeIntoObject methods added additional check to an if statement: from: if (targetAggregate == null to if (targetAggregate == null || targetAggregate == sourceAggregate The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |