| Summary: | Unwanted insert statement generated when using ElementCollection with lazy loading. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Vikram Bhatia <vikram.jeet.bhatia> | ||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | vikram.jeet.bhatia | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Vikram Bhatia
Created attachment 193325 [details]
Testcase Source
The issue is the databaseCount of the DirectCollectionChangeRecord is incremented prior to recording the removal from the collection. The code however assumes that the element has already been removed from the collection as it would have been for DeferredChangeTracking. Working on probable fix currently. Created attachment 193952 [details]
Proposed Fix inclusing testcase.
Fixed in EL trunk At revision: 9259 Added a flag to CollectionChangeEvent to identify if the change has already been applied to the collection before raising collection change event ADD or REMOVE. The flag will be passed as true from IndirectList, IndirectSet and IndirectMap whereas false from DirectCollectionMapping while merging the object. Changed ContainerPolicy and its subclasses to pass the flag in createChangeEvent method. Reopening the bug as the testcase added for this bug does not work when run along with Application Servers (WLS/WAS/JBoss/GlassFish). Created attachment 194080 [details]
Fix for testcase to run along with App Servers
Fixed test case to run with application servers. At Revision: r9261 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |