Bug #5171

Property Mapper: different action required when identity query returned more than 1 object

Added by Manuel Strausz almost 12 years ago. Updated almost 11 years ago.

Should have
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


Currently, when \F3\FLOW3\Property\Mapper::findObjectByIdentityProperties finds more than 1 object, it returns FALSE, which is the same as if 0 objects where found. There is an error message added to the mapping results, but this doesn't appear anywhere since an exception is thrown first.
The transformToObject method then throws an exception that is worded like this: "Querying the repository for the specified object was not successful."
There should be either a more verbose exception message stating that there was an integrity violation problem detected while querying, or a message added to the system logger to at least give a hint towards the real problem.

Alternatively, only the first found object could be returned and just a warning added to the log.

Even if it should not be possible for more than 1 object with the same identity to exist in the persistence backend, we should still take this case into consideration.

Also available in: Atom PDF