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

Sören Kracker s.kracker at kopfstand-mail.de
Tue Nov 8 11:22:59 CET 2011


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