This gives me the following error
Cannot select entity through identification variables without choosing at 
least one root entity alias.


2014 m. gruodis 3 d., trečiadienis 11:04:18 UTC+2, Jàπ (Jasper N. Brouwer) 
rašė:
>
> You'll probably need to use a regular join, as the associations are 
> mapped. Maybe something like this: 
>
>     foreach ($this->assoc as $key => $mapping) { 
>         $queryBuilder 
>             ->addSelect(substr($key, 0, 1) . ' AS ' . $key) 
>             ->leftJoin( 
>                 'u.' . $mapping['fieldName'], 
>                 substr($key, 0, 1) 
>             ); 
>     } 
>
> --   
> Jasper N. Brouwer 
> (@jaspernbrouwer) 
>
>
> On 3 December 2014 at 08:05:30, Andrius Kulbis ([email protected] 
> <javascript:>) wrote: 
> > Maybe there is a workaround for this? 
> >   
> > 2014 m. gruodis 3 d., trečiadienis 00:48:07 UTC+2, Marco Pivetta rašė: 
> > > 
> > > This is actually the expected result when having multiple selected 
> > > entities in an arbitrary join DQL query. 
> > > 
> > > Same result if you select various scalar fields and then the root of 
> the 
> > > selection in your DQL. 
> > > 
> > > Marco Pivetta 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to