[BUGFIX] PersistentObjectConverter works with "immutable" properties
The PersistentObjectConverter sets convertedChildProperties on the
object after it was created (either newly constructed or
hydrated from persistance). Creating a new object will filter
constructor arguments from the convertedChildProperties but
if the object already existed that does not happen.
This poses a problem for objects that accept arguments in the
constructor that are not settable afterwards. So those properties are
In cases where you cannot be sure if an object already exists and you
give the identity and all properties of an object with "immutable"
properties the property mapping will fail if the object already existed
as the converter tries to set the "immutable" properties as well.
With this change we check for this kind of properties and compare the
given value with the already set value. In case they are identical
we ignore the given value and proceed with the property mapping. In
case they differ there is an inconsistency in your data that we cannot
handle and so throw an exception.
This is not breaking as before in all cases an exception would be thrown.
Releases: master, 2.3, 2.2, 2.1