[TYPO3-mvc] Extbase query with AND over 1:n related objects

Jochen Rau jochen.rau at typo3.org
Thu Mar 29 22:49:22 CEST 2012


Hi Till,

> >What about
> >
> >$query->contains('book.categories', $category);
> This gives the same result (also books with only one of the given
> categories).
> What i need is all the bookes with all of the given categories. e.g.
> books which are "classic" and "novel" at the same time...

Just to be sure: Did you change your relation to m:n?

Could you please provide us with the query Extbase creates in the
Typo3DbBackend::getObjectDataByQuery() by uncommenting the debug line?

-Jochen


More information about the TYPO3-project-typo3v4mvc mailing list