| Summary: | No-Weaving: Using an Entity mapped as a subclass as @MapKey exceptions thrown on flush when persisting a new Map Element | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Tom Ware <tom.ware> | ||||
| Component: | Eclipselink | Assignee: | Tom Ware <tom.ware> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | eclipselink.foundation-inbox, ljnelson | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Tom Ware
Note: This issue does not occur with weaving enabled. Created attachment 167735 [details]
Proposed changes
Fixed in the trunk stream. Reviewed by Chris Delahunt The fix does two things: 1. When looking for the descriptor to create a change set for a Map, look for the descriptor of the actual target value instead of the reference descriptor for the mapping 2. Ensure that the values we merge are wrapped as Map.Entries when building that change set. Added a test to InheritenceTestModel. That test creates a situation where the issue will be recreated when weaving is disabled and hence will only recrate the problem when these tests are run without weaving. Since this issue is non-deterministic, this test will act differently depending on the path that gets followed. It does, however, recreate the above situation when weaving is disabled. Incidentally, the workaround suggested does not work; I still (intermittently) get the first exception after inserting the flush() as recommended. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |