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.

Status:
Resolved
Priority:
Should have
Category:
Property
Start date:
2009-10-29
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

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.

#1

Updated by Karsten Dambekalns almost 12 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
#2

Updated by Karsten Dambekalns almost 12 years ago

  • Target version set to 1.0 alpha 7
#3

Updated by Karsten Dambekalns almost 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3531.

Also available in: Atom PDF