Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328494 - Partial backport of bug 228428
Summary: Partial backport of bug 228428
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-22 12:03 EDT by David Minsky CLA
Modified: 2022-06-09 10:27 EDT (History)
0 users

See Also:


Attachments
Backport patch (1.02 KB, patch)
2010-10-22 12:24 EDT, David Minsky CLA
no flags Details | Diff
Revised patch incorporating whole method (3.83 KB, patch)
2010-10-22 15:24 EDT, David Minsky CLA
no flags Details | Diff
Proposed changes to 2.1 trunk (2.1.3) (3.83 KB, patch)
2011-03-02 12:53 EST, David Minsky CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Minsky CLA 2010-10-22 12:03:24 EDT
Requirement to partially backport the following bug to the 2.0 line:

Bug 228428 - FORUM: compare non mutable mappings with equals

Situation:

- Create/Read a parent object
- Create a child object with an array of data (e.g. byte[]) mapped with TransformationMapping
- Add child object to parent, begin transaction, persist parent, commit transaction
- Create another object with an array of data (e.g. byte[])
- Change attribute on parent, begin transaction, persist parent, commit transaction
- 2 extraneous update statements are performed for the child object where the child's data has not changed (the array of data)

Problem:

- AbstractTransformationMapping compareForChange does not take into account clone and backup field values may be array data
- Comparison of potential array data needs to be made in order to avoid creating an erroneous change record for array data that has not changed, yet create a correct change record if array data has changed

This change needs to be backported to 2.0. The transaction that made these changes in trunk was created under bug 301599 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=301599 and fixed in r8077 (trunk)
Comment 1 David Minsky CLA 2010-10-22 12:24:39 EDT
Created attachment 181517 [details]
Backport patch
Comment 2 David Minsky CLA 2010-10-22 15:24:18 EDT
Created attachment 181543 [details]
Revised patch incorporating whole method
Comment 3 David Minsky CLA 2010-10-22 16:17:11 EDT
Checked into 2.0 trunk (2.0.3) r8394
Reviewed: Tom Ware
Comment 4 David Minsky CLA 2011-03-02 12:53:06 EST
Created attachment 190184 [details]
Proposed changes to 2.1 trunk (2.1.3)
Comment 5 David Minsky CLA 2011-06-06 11:48:09 EDT
Checked into 2.1.3 at r9069
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:14:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:27:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink