[TYPO3-mvc] How to filter output when n:1 relation between objects?

Roland most.wanted at gmx.at
Tue Nov 8 14:07:04 CET 2011


hi sören,

thanks, this helped. i can see this now also on the Extbase Cheat Sheet 
and understand the principle a little more after your answer.

kind regards.

roland


Am 08.11.11 11:22, schrieb Sören Kracker:
> You can call $productRepository->findByCountry($country_uid); in your
> controller. $productRepository is of course an object of your product
> repository.
> This works without creating the function findByCountry yourself.
>
> Am 08.11.2011 11:11, schrieb Roland:
>> In my domain model there is an object "Product" and an object
>> "Country" with are related n:1 (!).
>>
>> How i try to output all Products which are sold in a specific Country.
>>
>> The uid of the Country is present as an get parameter.
>>
>> QUESTION: Where and how do i have to define the query?
>>
>> i guess it is the ProductRepository.php, isn't it?
>>
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list