Bug 537855 - A with @Convert annotated property doesn't get updated
Summary: A with @Convert annotated property doesn't get updated
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: core
Depends on:
Blocks:
 
Reported: 2018-08-10 07:46 EDT by Roger Wegmann CLA
Modified: 2022-06-09 10:21 EDT (History)
0 users

See Also:


Attachments
A little maven project with a unit test that fails caused by this bug. (5.76 KB, application/zip)
2018-08-10 07:46 EDT, Roger Wegmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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