Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322290 - attribute value not in sync with woven value holder after getRealAttrValue call
Summary: attribute value not in sync with woven value holder after getRealAttrValue call
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-10 16:56 EDT by Andrei Ilitchev CLA
Modified: 2022-06-09 10:32 EDT (History)
0 users

See Also:


Attachments
suggested patch (17.00 KB, patch)
2010-08-10 17:11 EDT, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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