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

Bug 315657

Summary: Meta data complete auto discovers weaved transient fields from static weaving
Product: z_Archived Reporter: Tom Ware <tom.ware>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P2 CC: jamesssss, peter.krogh
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tom Ware CLA 2010-06-03 15:27:35 EDT
In bug 315242 we fixed an issue with fetch groups and weaving by ignoring variables called _persistence_fetchGroup in our metadata processing code.

This fix needs to be revisited.

Some suggestions to solve the problem:

1. Add an EclipseLink specific annotation to get EclipseLink to ignore the field
2. Add a property that affects whether weaved fetch groups are serializable and default it to false
Comment 1 Peter Krogh CLA 2010-07-26 14:06:27 EDT
Revisit for 2.2.0
Comment 2 Peter Krogh CLA 2010-11-10 11:17:58 EST
Deferred to future as part of 2.2.0 bug scrub.
Comment 3 James Sutherland CLA 2011-05-18 11:11:56 EDT
If you use static weaving and metadata complete any weaved fields (fetch groups, lazy 1-1, etc.) will be auto mapped.

I am extending the existing fix to ignore all EclipseLink weaved fields, as the original fix was only ignoring fetch groups.  But the issue is bigger than this, if any other framework is also weaving in fields and using @Transient to have them ignored by JPA (such as we do for JAXB adding @XmlTransient), then we will auto map these fields.

Perhaps we should not auto map any @Transient fields, or have an option that allows this to be set.

Workarounds include dynamic weaving, method access, marking the fields as Java transient, using our xml flag to ignore default mappings.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:19:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink