Community
Participate
Working Groups
Build Identifier: 2.0.0.v20091127-r5931 version: Eclipse Persistence Services - 2.0.0.v20091127-r5931 A rather simple JPQL query produces an unnecessary table join. Please refer to the attached testcase (NetBeans project). The generated native SQL is: SELECT t0.ID , t0.PROVIDERID FROM TRIP t0 WHERE t0.PROVIDERID NOT IN ( SELECT t1.PROVIDERID FROM TRIP t2 , TRIPEXCLUDE t1 WHERE ( ( ( (t1.PROVIDERID = t2.PROVIDERID) AND (t1.SEARCHERID = ?) ) AND (t1.SERVICEID = ?) ) AND (t0.ID = t2.ID) ) ) The SQL should be as follows (not including table t2): SELECT t0.ID , t0.PROVIDERID FROM TRIP t0 WHERE t0.PROVIDERID NOT IN ( SELECT t1.PROVIDERID FROM TRIPEXCLUDE t1 WHERE ( ( ( (t1.SEARCHERID = ?) ) AND (t1.SERVICEID = ?) ) ) ) Reproducible: Always Steps to Reproduce: Please refer to attached testcase
Created attachment 157068 [details] NetBeans project in zip file
Setting target and priority. See the following page for details of what those values mean: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
The query is, "select object(t) from Trip t where t.providerId not in( select tex.providerId from TripExclude tex where tex.providerId = t.providerId and tex.searcherId = :memberId and tex.serviceId = :serviceId)"
This was fixed. Verified that it no longer occurs in 2.4.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink