[TYPO3-mvc] Using IN statement in MM queries

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Apr 13 10:44:07 CEST 2011


Hey,

> I have noticed that it currently isn't possible to use the $query->in()
> statement when filtering MM relations and since $query->contains() isn't
> able to handle arrays or QueryResult objects - I would like to raise a
> discussion regarding which of the operator methods should be modified in
> Tx_Extbase_Persistence_Storage_Typo3DbBackend?

what exactly are you trying? $query->in('object.mmProperty', $someArray) ?

If so, try this:
$query->in('object.mmProperty.uid', $array);

Try to compare the UID of the related object instead of the property 
(and thus only the raw DB value) itself.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list