Bug #5171

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

Added by Manuel Strausz almost 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-10-29
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Property
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 7
PHP Version: Complexity:
Has patch: Affected Flow version:

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.

Associated revisions

Revision 87f4abaa
Added by Karsten Dambekalns over 5 years ago

[~TASK] FLOW3 (Property): The Mapper now throws different exceptions if no ore more than one object were found for given identity properties. Fixes #5171.

History

#1 Updated by Karsten Dambekalns almost 6 years ago

  • Status changed from New to Accepted
  • Assigned To set to Karsten Dambekalns

#2 Updated by Karsten Dambekalns over 5 years ago

  • Target version set to 1.0 alpha 7

#3 Updated by Karsten Dambekalns over 5 years ago

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

Applied in changeset r3531.

Also available in: Atom PDF