Community
Participate
Working Groups
Build Identifier: In a base Element entity I have a transient property util with type Util, where Util performs reflection services. I also (for other purposes) have custom getter annotations such as @NoviceProperty, @ExpertProperty, @SystemProperty. @Entity abstract public class Element implements Serializable { .. private Util util; //@SystemProperty @Transient public Util getUtil() { if (util == null) { util = new Util(this); } return util; } public class Util { private WrapDynaClass dynaClass; .. } } This works fine with EclipseLink2.0.1. But when I use the custom annotations, EclipseLink2.1.2 gives the following error: Mapping annotations cannot be applied to fields or properties that have a @Transient specified. [method getUtil] is in violation of this restriction. at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:373) Commenting out the custom annotation @SystemProperty removes the error. Reproducible: Always Steps to Reproduce: 1. Create a custom method (getter) annotation. 2. Apply it to a @Transient property getter of a entity. 3. Try to deploy the web application to Glassfish3.0.1. For me this is a major feature break, as I need this powerful transient Util property in my base class.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
This is a duplicate of bug 330395 and will be available in 2.1.3 In the mean time, you can mark the util property as transient in XML and remove the @Transient from the class to get around the issue. *** This bug has been marked as a duplicate of bug 330395 ***
@tom @guy thanks for feedback and duplicate identification and XML workaround tip, darren
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink