Community
Participate
Working Groups
Build Identifier: 2.1.0.v20100503-r7134 A regression was observed from GlassFish 3.0.1 (uses EclipseLink 2.0.1) to GlassFish 3.1 (EclipseLink 2.1-M7). Hope that this can be analyzed for impact before gates are closed for 2.1. Here are the details: An extra table alias is used while querying with model containing ternary relationships which results in more than required rows returned to user. Query produced by EL 2.0.1 - SELECT t2.ID, t2.CUSTOMERNAME FROM LINEITEM t0, ORDER_TBL t2, ITEM t1 WHERE ((t1.NAME = ?) AND ((t0.ORDER_ID = t2.ID) AND (t1.ID = t0.lineItems_KEY))) Query produced by EL 2.1 - SELECT t2.ID, t2.CUSTOMERNAME FROM ITEM t3, ORDER_TBL t2, ITEM t1, LINEITEM t0 WHERE ((t1.NAME = ?) AND ((t0.ORDER_ID = t2.ID) AND (t1.ID = t0.LINEITEMS_KEY))) Note that table alias t3 is not required. Also see https://glassfish.dev.java.net/issues/show_bug.cgi?id=12131 Reproducible: Always Steps to Reproduce: Attached is a simple test case that reproduces the issue. To run the test, open jar, edit build.properties to point to your workspace and test.properties to point to your database and execute "ant run".
Created attachment 171353 [details] test case
Setting target and priority. See the following page for details of the meanings of these: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
This bug was fixed on June 7th. Revision 7522
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink