For the following Jboss-ql statement: SELECT OBJECT( o ) FROM User o ORDER BY o.organicPosition.name ASC
Jboss CMP generates the following database query: SELECT t0_o.id, t1_o_organicPosition.name FROM tuser t0_o, tposition t1_o_organicPosition ORDER BY t1_o_organicPosition.name ASC This statement misses the where statement implied by o.organicPosition. The correct sql statement would be: SELECT t0_o.id, t1_o_organicPosition.name FROM tuser t0_o, tposition t1_o_organicPosition where t0_o.position = t1_o_organicPosition.id ORDER BY t1_o_organicPosition.name ASC Tested with Jboss 3.2.2final ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user