Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357103

Summary: Change sets for new objects are updated with Version and Generated ID information when they should not be
Product: z_Archived Reporter: Tom Ware <tom.ware>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.foundation-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix 2.1.x stream
none
Proposed fix trunk and 2.3.x
none
some additional changes none

Description Tom Ware CLA 2011-09-08 11:01:40 EDT
Change sets for new objects are generally empty - unless set to behave otherwise.

When this occurs in the default case, it will cause partial objects to be sent when using cache coordination.  These partial objects can result in incorrect remote caches when cache coordination is set to SEND_OBJECT_CHANGES or SEND_OBJECT_CHANGES_WITH_NEW_OBJECTS.
Comment 1 Tom Ware CLA 2011-09-08 11:18:05 EDT
Created attachment 203005 [details]
Proposed fix 2.1.x stream
Comment 2 Tom Ware CLA 2011-09-08 11:22:14 EDT
Recreation can be found in test case attached with patch.
Comment 3 Tom Ware CLA 2011-09-08 15:17:48 EDT
Created attachment 203020 [details]
Proposed fix trunk and 2.3.x

Trunk and 2.0.3 have already solved the initial problem, but have some other code that potentially causes the same issue when using a returning policy.
Comment 4 Tom Ware CLA 2011-09-09 10:05:59 EDT
Checked changes into 2.1.4 - review still pending (Andrei Ilitchev, James Sutherland)
Comment 5 Tom Ware CLA 2011-09-09 13:13:32 EDT
Fixes are slightly different for 2.1/2.2 and trunk/2.3

Both changes check to ensure a changeSet is not new before adding extra records to it.

In 2.1/2.2 we fix this for sequencing and optimistic locking

In trunk/2.3 the above items are already addressed, but we add some changes for returning policy.

Reviewed by Andrei Ilitchev

Added test to relationships model

Tested with JPA LRG and Returning model tests
Comment 6 Tom Ware CLA 2011-09-13 16:16:53 EDT
Created attachment 203299 [details]
some additional changes
Comment 7 Tom Ware CLA 2011-09-14 10:27:09 EDT
Additional changes checked in. - all checked in to 2.3 and trunk, only test changes and DescriptorEvent changes checked into 2.1 and 2.2
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:15:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:33:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink