[TYPO3-mvc] MM Relation in matching()

Jochen Rau jochen.rau at typoplanet.de
Thu Sep 17 20:32:23 CEST 2009


Hi Sebastian.

Sebastian Fischer wrote:
> my current problem is, that i want to select videos by given category.
> No i don't see how to get a constraint that returns me the wished records.
>
> So structure is like video, mmtable, category. In TCA everything is fine
> and i can choose the category in the video. But i dont see who to set
> the matching.

Let's assume your Video has a property "category" holding (references 
to) Category instances and there is a VideoRepository.

Did you try
$videos = $videoRepository->findByCategory($category);

Regards
Jochen

-- 
Every nit picked is a bug fixed



More information about the TYPO3-project-typo3v4mvc mailing list