Is id the primary key of R? Then this query returns a collection of
distinct R-entities and there is nothing to group.
Could you give an example with some simple data, the result and your
expected result?
On Thursday, 13 February 2014 20:42:30 UTC+1, Parsifal wrote:
>
> entity r is ManyToOne with entity i, and entity i is OneToMany to entity
> r.
> Now I have this:
> $query = $em->createQuery("SELECT x, y.optVar1, FROM Entities\R x JOIN
> x.I y WHERE (x.productId = :n AND x.key = :f) GROUP BY x.id");
> It works fine, just GROUP BY is not working, it returns the array just
> like there is no GROUP BY, in order to fix it, what else should I care
> when mapping the two entities with each other?
>
--
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/groups/opt_out.