[TYPO3-mvc] Unsure if i spotted a bug

Sebastian Fischer sf at marketing-factory.de
Mon Jan 3 16:16:09 CET 2011


On 03.01.2011 16:07, Franz Koch wrote:
> Hey Sebastian,
>
>> looking into the Tx_Extbase_Persistence_QueryResult class i have seen
>> something that worries my a little.
> ...
>> $query = clone $this->query;
>> $query->setLimit(1);
>> $queryResult = $this->dataMapper->map($this->query->getType(),
>> $this->persistenceManager->getObjectDataByQuery($this->query));
> ...
>> If i understand it right, target is to have a query with limit one in
>> $query. But this object isnt used when it comes to mapping, or is it my
>> misunderstanding? Wouldn't it be a better solution to use:
>>
>> $this->dataMapper->map($query->getType(),
>> $this->persistenceManager->getObjectDataByQuery($query));
>
> from what you're posting here I'd say this is a "bug". What sense does
> it have to clone and configure the query object and then don't use it.
> Please file a bugreport and I'll take care of it after having talked to
> Bastian what his main intention here was. But in my eyes using a query
> with limit here absolutely makes sense performance wise.
>

Issue is filed as Bug #11855 http://forge.typo3.org/issues/11855

Thanks for taking care

Greetings
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list