| Summary: | transient field/property in embeddable entity | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Martin Priekopa <priekopa> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eclipselink.foundation-inbox, tom.ware | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | submitted_patch | ||||||
| Attachments: |
|
||||||
This appears to be a foundation bug. Not related to the build system. Reassigning. Investigating patch I've reproduced your problem, however only when the transient is mapped through XML. Safe to assume your transient is mapped in XML? Mapping it with @Transient (and removing the XML mapping) should get you past the NPE for the time being. Created attachment 197323 [details]
Patch
yes, sry about forgetting to mention that i used XML to specify OR mappings. too much mojitos ... ;). (In reply to comment #3) > I've reproduced your problem, however only when the transient is mapped through > XML. Safe to assume your transient is mapped in XML? > > Mapping it with @Transient (and removing the XML mapping) should get you past > the NPE for the time being. Changes submitted to the main trunk. Once the 2.3.1 stream opens this fix will be submitted there as well. Verified by: Tom Ware Tests: Metadata processing error. Model change made to expose error. With fix in place the error goes away and all tests pass (FullRegressionTestSuite) Changes have been submitted to the 2.3.1 stream The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Build Identifier: EclipseLink, version: Eclipse Persistence Services - 2.2.0.v20110202-r8913 - it is not possible to have transient field in the embeddable entity (C) that is associated from other embeddable entity (B) participating in embeddable element collection - A ->* B -> C@transientField; A - plain persistent entity; B, C - embeddable classes - my quickfix: ElementCollectionAccessor.java @@ -754,10 +795,13 @@ if (! mappingAccessor.isProcessed()) { mappingAccessor.process(); } - + // Now you can safely grab the mapping off the accessor. DatabaseMapping mapping = mappingAccessor.getMapping(); - + if (mapping == null) { + continue; + } + // Figure out what our override name is to ensure we find and // apply the correct override metadata. String overrideName = (dotNotationName.equals("")) ? mapping.getAttributeName() : dotNotationName + "." + mapping.getAttributeName(); Reproducible: Always Steps to Reproduce: 1. create mapping such as: A ->* B -> C@transientField; A - plain persistent entity; B, C - embeddable classes 2. configure persistence unit & runtest 3. exception is thrown Caused by: java.lang.NullPointerException at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ElementCollectionAccessor.processMappingsFromEmbeddable(ElementCollectionAccessor.java:804)