I am having a strange problem with EclipseLink For an Entity having collection class Department { List<Employee> employees; List<Section> sections; }
1. If I use the below query SELECT dePartment From Department dePartment LEFT JOIN FETCH dePartment.employees LEFT JOIN dePartment.employees emps
It is fetching only dePartment entities without the collection. If I use alias name as department instead of dePartment(observe the case of letter P) Is the alias name case sensitive? sounds silly
2. If I use the below query SELECT dePartment From Department dePartment LEFT JOIN FETCH dePartment.employees LEFT JOIN dePartment.employees emps LEFT JOIN FETCH dePartment.sections LEFT JOIN dePartment.sections sects
Then it is fetching only first child collection.
If I change the join order like below, SELECT dePartment From Department dePartment LEFT JOIN FETCH dePartment.employees LEFT JOIN FETCH dePartment.sections LEFT JOIN dePartment.employees emps LEFT JOIN dePartment.sections sects Then it is fetching both the child collections.
Is the order of join columns matter in EclipseLink?
3. Are the above said things are
specific to EclipseLink or JPA Conventions? |