Actually, no, i did not post twice. For the other post i did not use group
by at all. For that i just noticed if i use
Select c, u from
The array will be different than if i use
Select c, u.blah from
That seems odd to me. In the other post i asked this is intentional to get
different array format or i am doing something wrong.
 در 2014 2 14 07:19، "Herman Peeren" <[email protected]> نوشت:

> Sorry, only now I see you posed the same question in another thread again:
> doen't do that, please. I'll read that and answer there.
>
> On Friday, 14 February 2014 07:14:58 UTC+1, Herman Peeren wrote:
>>
>> 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.
>

-- 
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.

Reply via email to