[TYPO3-mvc] findByUid probably not working?

Steffen Ritter info at rs-websystems.de
Wed Nov 25 19:12:41 CET 2009


Frederic Gaus schrieb:
> Hello,
> 
> my fe_users looks mainly like this:
> uid / pid / name
> 1 / 0 / John Doe
> 2 / 4 / Bouche
> 
> I wrote the following code:
> $userRepository = 
> t3lib_div::makeInstance('Tx_Extbase_Domain_Repository_FrontendUserRepository'); 
> 
> $users = $userRepository->findAll();
> 
> This returns only the user "John Doe" on PID=0. A call of the method 
> findByUid(1) also returns this fe_user The user Bouche is not fetched by 
> "findAll" at all. Furthermore, findByUid(2) throws the following exception:
> 
> Expected parameter 1 to be object, NULL given
> 
> Tx_Extbase_MVC_Exception_InvalidArgumentType thrown in file 
> /var/www/typo3/typo3_src-4.3.0RC1/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php 
> in line 134.
> 
> Could someone help me, please?
> Thanks in advance! Best wishes
> 
> Frederic
> 
> 
DId you set your storage pids correctly in TS?


More information about the TYPO3-project-typo3v4mvc mailing list