[TYPO3-mvc] Query constraints using MM relations

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Mar 23 03:10:27 CET 2011


Hey Jacob,

> But I would like to make a custom filter in the Domain Repository for
> Tx_Churchbase_Bygning, so I added a method in the repository class:
>
> public function findBySogne() {
> return $query->matching(
> $query->in('sogne', array(1, 2))
> )->execute();
>
> }
...
> Btw. sorry for the long post

long post, short answer.

$query->in('sogne.uid', array(1, 2))

Try this, should do the trick, but probably the way you tried it should 
also work.
-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list