[TYPO3-mvc] Multiple filter with mm relation

Claus Fassing claus at fassing.eu
Fri May 25 17:33:10 CEST 2012


Hello,

Am 14.05.2012 20:40, schrieb Claus Fassing:
> I try to define more than one filter (category select) with mm relation.
> e.g.
> One item belong to more than one category. A set of select elements from
> frontend view should reduce the result.
>
>  From sql point of view it could work with subselect, but how looks the
> query setup from extbase ?
> Is this possible at all ?

my mistake (of course :))

The reason, a wrong category attribute setting.

I changed this from

/**
  * category
  * @var Tx_EXT_Domain_Model_Category
  */
  protected $category;

to

/**
  * category
  * @var Tx_Extbase_Persistence_ObjectStorage<Tx_EXT_Domain_Model_Category>
  */
  protected $category;

Now I can work with $query->contains and logicalAnd.

Regards Claus


More information about the TYPO3-project-typo3v4mvc mailing list