Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322290

Summary: attribute value not in sync with woven value holder after getRealAttrValue call
Product: z_Archived Reporter: Andrei Ilitchev <andrei.ilitchev>
Component: EclipselinkAssignee: 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:
Attachments:
Description Flags
suggested patch none

Description Andrei Ilitchev CLA 2010-08-10 16:56:59 EDT
Happens only in field access case.
After LoadPolicy loads OneToOne weaved value holder the corresponding attribute still not initialized.
Weaving takes care of synchronizing it with the weaved vh - but only if the attribute accessed directly or through getter/setter.
Reflectively accessed attribute is still not initialized.
Comment 1 Andrei Ilitchev CLA 2010-08-10 17:11:24 EDT
Created attachment 176283 [details]
suggested patch

The patch extends approach taken by property access case to field access: WeavedObjectBasicIndirectionPolicy is set as an indirection policy in case of weaving of ObjectReferenceMapping for indirection.
The only difference with property access case is that instead of the original setter method (i.e. setAddress) the weaved method is used (i.e. _persistence_set_address).

To test the patch added attrAndVHContainSameObjectAfterGetRealAttributeValue for both fieldaccess and property access versions of SimpleSerializeFetchGroupTests.
Comment 2 Andrei Ilitchev CLA 2010-08-10 18:34:44 EDT
The patch checked into both trunk and 2.1.1
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:14:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:32:00 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink