[TYPO3-extbase] Query Language: Filter on child objects

Markus Guenther markus.guenther at me.com
Tue Aug 11 21:50:52 CEST 2015


Hi dirk it is a bit late. So I just write a short message from the phone. 

If you have a model with the relation to the frontendUser you are able to call something like 

$bets = $this->betRepository->findByFrontendUser($user);

This can be modified in the controller or just assigned to the view. If this does not help you.

Ask the guys in the extbase channel on slack.

Greets Markus


https://forger.typo3.org/slack

Von meinem iPhone gesendet

> Am 11.08.2015 um 21:07 schrieb DirkHo <dirk_studivz at web.de>:
> 
> Hi all,
> 
> I'm just writing my first extension and have a question where I found no google answer for. Hopefully you can and are willing to help me:
> 
> I create a sports bet extension (nothing commercial, in german it's "Tippspiel"). My Model looks as follows: Several leagues can be created, each league has at least one competition, each competition has at least one match day, each match day contains one match and every match may have several bets. Each bet belongs to one customer.
> 
> Currently I iterate over every league, every competition, every matchday, every match and every bet in fluid and output it.
> 
> What I now want to do is to filter the bets to show only those bets belonging to the current frontend user. Is it possible to filter the objects to only show those that belong to that user? So that I still can iterate starting with the leagues but only matches are shown that have bets from that user and as child objects only the bets of that user?
> 
> Thanks and kind regards,
> 
> Dirk
> _______________________________________________
> TYPO3-team-extbase mailing list
> TYPO3-team-extbase at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-extbase
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-extbase/attachments/20150811/dbfef402/attachment.htm>


More information about the TYPO3-team-extbase mailing list