[TYPO3-50-general] Identity definition - integrity checks?
manuel.strausz at chello.at
Thu Oct 29 12:11:21 CET 2009
Just to clarify, I'm talking about the \F3\FLOW3\Property\Mapper class here,
and specifically the findObjectByIdentityProperties method.
The exception is thrown one step later by the transformToObject method.
Which is confusing, since it just says that the query was unsuccessful (but
gives no indication as to why).
I'm really not sure what the intended behaviour should be in this case.
Should findObjectByIdentityProperties return FALSE when it finds more than 1
object, throw an exception, or just return the 1st one? How does one prevent
duplicate identities in general?
Sorry for being so nosy, just want to make sure I understand the mechanics
I'll gladly open a ticket, just wasn't sure if this is a bug at all or just
a misunderstanding from my side.
By the way, great work on the framework so far, it's really the best
structured piece of code I've seen in a while. Been reading through the
codebase since a week, and it's a real joy to figure out all the details :)
"Karsten Dambekalns" <karsten at typo3.org> schrieb im Newsbeitrag
news:mailman.1.1256809561.8303.typo3-project-5_0-general at lists.typo3.org...
> On 27.10.09 08:11, Martin Kutschker wrote:
>> Manuel Strausz schrieb:
>>> After some deeper digging through the Mapper class, I found out that the
>>> Mapper indeed found 2 objects, but returned FALSE since there were 2
>>> found with the same identifier key.
>> The mapper could (should?) throw an exception in this case. If FALSE
>> means no object is found, then
>> it shouldn't return FALSE on error conditions.
> Seems weird, need to check, true. Could you open an issue for that in
> the Forge? That would be great, thanks!
More information about the TYPO3-project-5_0-general