« Previous | Next » 

Revision 525a8942

ID525a8942af2866966c8b86c6995734b7885e451c
Parent 4a097a0d
Child 6d9994b2

Added by Christian Müller almost 7 years ago

[!!!][BUGFIX] Correct object modification exception trigger

The PersistentObjectConverter throws an exception if there are
properties to be set on the object and modification was not allowed
in the PropertyMappingConfiguration.
The decision if there are properties to be set was done based on the
amount of entries in the ``$source`` array, but in fact only the
``$convertedChildProperties`` are set to the model, so the check
should check if there is anything in that array.

That means you can have any amount of arbitrary data in your data
source as long as it is not converted to an actual child property.
Which is determined by the ``getSourceChildPropertiesToBeConverted``
method of the converter.

This is breaking if you rely on the fact that the exception is thrown
if you have arbitrary data in $source even though that data would
never have been set to your model.

Change-Id: Id88bb253834b937231cffe5eb8a1245bc640f123
Releases: master

  • added
  • modified
  • copied
  • renamed
  • deleted