[TYPO3-mvc] storagePid and findObjectByUid

Elías Fernández eliasfernandez at gmail.com
Tue Dec 1 08:03:46 CET 2009


sure, or maybe this is not the correct place.
Anyway, thanks for consider this mail.


2009/11/30 Jochen Rau <jochen.rau at typoplanet.de>

> Hi Elías.
>
>
> Elías Fernández wrote:
>
>> In my repository when i want to update an item, always throw
>> Tx_Extbase_MVC_Exception_InvalidArgumentValue exception, because the
>> mapper
>> try to use findObjectByUid and it is storagePid dependant.
>> ( The edit page is in another page than the list view )
>>
>> I didn´t find a way of change setRespectStoragePage via pages.
>>
>> I think here is not very important the restriction of being in the same
>> pid
>> or not. Finally, i modify the Mapper class and insert the
>> setRespectStoragePage to the findObjectByUid
>>
>> protected function findObjectByUid($dataType, $uid) {
>> $query = $this->queryFactory->create($dataType);
>> $query->getQuerySettings()->setRespectStoragePage(FALSE);
>> $result = $query->matching($query->withUid($uid))->execute();
>> $object = NULL;
>> if (count($result)>  0) {
>> $object = current($result);
>> }
>> return $object;
>> }
>>
>
> Well, I fully agree with you. We have to provide a way to specify if the
> pid should be respected or not while fetching related objects. IMO we should
> setRespectStoragePage(FALSE) inside findObjectByUid by default.
>
> But maybe Sebastian K. has a contrary opinion ;-)
>
>
> Regards
> Jochen
>
>
>
> --
> Every nit picked is a bug fixed
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>



-- 
Elías Fernández Velázquez
http://www.recetae.com
http://www.eliasfernandez.net
http://www.trevenque.es


More information about the TYPO3-project-typo3v4mvc mailing list