Bugs item #1081794, was opened at 2004-12-09 02:21 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1081794&group_id=22866
Category: JBossCMP Group: v3.2 Status: Open Resolution: None Priority: 5 Submitted By: gunter zeilinger (gunterze) Assigned to: Nobody/Anonymous (nobody) Summary: JDBCEJBQLCompiler: Invalid SQL for Left join read ahead Initial Comment: JDBCEJBQLCompiler does not take care to put the right table name in front of the LEFT JOIN phrase: Extending the GangsterBean by finder: <query> <query-method> <method-name>findMembers_leftjoin</method-name> <method-params> <method-param>java.lang.String</method-param> </method-params> </query-method> <jboss-ql><![CDATA[ SELECT OBJECT(g) FROM gangster g WHERE g.organization.name = ?1 ]]> </jboss-ql> <read-ahead> <strategy>on-find</strategy> <page-size>4</page-size> <eager-load-group>basic</eager-load-group> <left-join cmr-field="hangout" eager-load-group="quick info"/> </read-ahead> </query> results in: SELECT t0_g.id, t0_g.name, t0_g.nick_name, t0_g.badness, t1_g_hangout.id, t1_g_hangout.city, t1_g_hangout.st, t1_g_hangout.zip FROM GANGSTER t0_g, ORGANIZATION t2_g_organization LEFT OUTER JOIN LOCATION t1_g_hangout ON t0_g.hangout=t1_g_hangout.id WHERE (t2_g_organization.name = ? AND t0_g.organization=t2_g_organization.name) 0 The order of GANGSTER t0_g, ORGANIZATION t2_g_organization is wrong. HSQL seems to be able to intepretate the statement anyway, but other DBs (e.g. PostgreSQL) report a SQL error. The EJBQLToSQL92Compiler simple ignores the Left join read ahead configuration for the cmr field: SELECT t0_g.id, t0_g.name, t0_g.nick_name, t0_g.badness, t0_g.cell_area, t0_g.cell_exch, t0_g.cell_ext, t0_g.page_area, t0_g.page_exch, t0_g.page_ext, t0_g.email, t0_g.organization, t0_g.hangout FROM GANGSTER t0_g LEFT OUTER JOIN ORGANIZATION t1_g_organization ON t0_g.organization=t1_g_organization.name WHERE t1_g_organization.name = ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1081794&group_id=22866 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development