Bug 537855

Summary: A with @Convert annotated property doesn't get updated
Product: z_Archived Reporter: Roger Wegmann <roger.wegmann>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 Keywords: core
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
A little maven project with a unit test that fails caused by this bug. none

Description Roger Wegmann CLA 2018-08-10 07:46:26 EDT
Created attachment 275345 [details]
A little maven project with a unit test that fails caused by this bug.

A with @Convert annotated property doesn't get updated when the property is modified like

dummy.getMutable().setValue( "new value" );

but when a new value for the property is set

dummy.setMutable( new Mutable( "new value" ) );

it works. I think it has somehow to do with the fact, that with @Convert annotated attributes are marked as not mutable.

In the class AbstractDirectMapping in the method buildCloneValue() a clone of the value is generated to detect modifications but in this case the cloned value is the same object than the orgin and thus no modification can ever been detected. Maybe the converted value should be remembered as cloned value then the modification could be detected.

I attached a little maven project with a unit test that fails caused by this bug.

If I do the same with the EclipseLink specific annotiations it works, but there I can inform in the implementation of the converter interface that the attribute is mutable.

Kind regards,

Roger
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:21:22 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink