[FLOW3-general] form.select and default item
Thomas Plessis
t.plessis at totemnumerique.com
Fri Dec 30 11:57:36 CET 2011
Yes, you're right. But i've still the same trouble, with the following error :
#1297759968: Exception while property mapping at property path "":Object with identity "0" not found.
TYPO3\FLOW3\Property\TypeConverter\PersistentObjectConverter_Original::fetchObjectFromPersistence("0", "Totem\Lewin\Domain\Model\Category")
regards
Thomas Plessis
Développeur multimédia
--
TOTEMnumerique
9, Place St Étienne
31000 Toulouse
T. 05 61 14 64 54
F. 05 61 14 64 55
Le 30 déc. 2011 à 11:36, Christian Müller (Kitsunet) a écrit :
> Hi both of you,
>
> just for clarification, you are both talking about extBase here, FLOW3 has no findByUid.
>
> Cheers,
> Christian
>
> On 30/12/11 11:30, Pankaj Lele wrote:
>> Hello Thomas,
>>
>>> I'm trying to add an empty category item on my form.select. But like it was mentioned in this old topic, the
>>> mapper fails because it tries to run: $categoryRepository->findByUid(0)
>>> which throws an exception.
>>> Any idea on how to fix that?
>>
>> I generally fix this in the controller itself. So you can do following
>> in your controller->action()
>>
>> $categories = $categoryRepository->findAll()->toArray();
>> $categories = array_merge(array(0 => ' Default category '), $categories);
>> $this->view->assign('categories', $categories);
>>
>> Happy new year!
>>
>>
>
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list