| Summary: | Refreshing Query with No Identity Map causes update | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Gordon Yorke <gordon.yorke> | ||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P2 | CC: | eclipselink.foundation-inbox | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Patched code committed Reviewed by Tom Ware Created attachment 208748 [details]
Small update to previous patch
Patch code committed 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 |
Created attachment 208585 [details] proposed Patch If an Entity is configured with No Identity Map ("eclipselink.cache.type=none") and a refresh query is executed on that Entity within a Persistence Context when the transaction commits an update will occur incrementing the version value even though the Entity has no changes. This issue is cause because without a cache the Revert API can not be used so mergeClone is used instead. Merge code, however, tracks changes and even though those changes are reverting the Entity to the latest state they are tracked as new changes. The solution is to update the refreshing code to use mergeClone to always refresh and make mergeClone aware of when it is being refreshed.