[TYPO3-mvc] Fetching objects from repository having specific related objects

Sebastian Kurfürst sebastian at typo3.org
Sat Sep 11 09:15:08 CEST 2010


Hey,

> But even if this would work, the problem would stay the same:
> $category->getSubcategory() would still fetch ALL subcategories…
This is absolutely correct.

If you need only the subcategories which match a certain subset, you
need to create an own method inside the category repository, where the
signature looks roughly like this:

public function getSubcategoryByParentCategory($parentCategory, ...
[additional constraints]);


Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list