I want to do one query, and I thought I could write it in the following two ways:
SELECT c, p
FROM MyBundle:Car c
JOIN c.person p
WHERE
p.name = :name
and
SELECT c, p
FROM MyBundle:Person p
JOIN p.car c
WHERE
p.name = :name
Since in both cases I was asking for "c, p" in that particular order, I was expecting the query to return the same thing, however, in the first case the object I get is of the type Car and on the second case is of type Person.
I don't understand why this happens, any light would be appreciated.