The only similar performance opimization I found in jobeet is the
table_method in the backend, but that's not what I'm searching for,
since I have three tables where one is the relation table, from which
I need meta-data for ordering..

On 23 Apr., 08:32, Tom Ptacnik <to...@tomor.cz> wrote:
> An example how to do this is in Practical Symfony jobeet 1.4
> (doctrine), but I don't remember the chapter..
>
> On 21 dub, 15:11, comb <sa...@gmx.net> wrote:
>
>
>
> > Hi
>
> > Tables: Gig, Song and GigSong (many-to-many).
>
> > I use a pager and in executeIndex I set up the Query:
>
> >                 $q = Doctrine_Query::create()
> >                 ->from('Gig g')
> >                 ->leftJoin('g.GigSong gs ON gs.gig_id = g.id')
> >                 ->orderBy('gs.order_id ASC');
>
> >                 $this->pager->setQuery($q);
> >                 ...
>
> > On the indexSuccess page there will be a call $gig->getSongs() for
> > each gig.
> > class Gig ..
> >         public function getSongs()
> >         {
> >                 $q = Doctrine_Query::create()
> >                 ->from('Song s')
> >                 ->leftJoin('s.GigSong gs ON s.id = gs.song_id')
> >                 ->andWhere('gs.gig_id = ?', $this->id)
> >                 ->orderBy('gs.order_id ASC');
> >                 return $q->execute();
> >         }
>
> > This results in 25 queries. How can I join the songs in the first
> > query?
>
> > In advance
> > comb
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to