Hi everyone!
I have a table "myTable" with a one-to-many relationship with "myOtherTable". "myOtherTable" has also a many-to-one relationship with "yetAnotherTable".
When I execute this query:
Code:
select p.id, myOthers from myTable p left outer join p.myOtherTables as myOthers
I get the id of "myTable" objects, whether they have "myOtherTable" elements or not, as a consequence of the left join.
But with this query:
Code:
select p.id, myOthers.yetAnotherTable from myTable p left outer join p.myOtherTables as myOthers
I just get the id of "myTable" objects that have "myOtherTable" childs.
Is there any way to get the behaviour of the first query with the second? Or I'm forced to pick the whole "myOtherTable" objects?
Thanks in advance.