Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink alias naming and ordering

I am surprised you are getting an issue with #1 below, please file a bug and include a recreation.

For your other issue, have a look at the following bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=303767

-Tom

janardhan n wrote:
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?



------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top