Bugs item #804968, was opened at 2003-09-12 12:55 Message generated for change (Comment added) made by loubyansky You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=804968&group_id=22866
Category: JBossCMP Group: v3.2 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Joachim Van der Auwera (triathlon98) Assigned to: Alexey Loubyansky (loubyansky) Summary: EJB->SQL conversion bug with OR Initial Comment: Given the following EJBQL : SELECT OBJECT(o) FROM Weight o WHERE ( o.sale.reference = ?1 ) OR ( o.purchase.reference = ?2 ) OR ( o.declaration.reference = ?3 ) with a pk field unid_uoid is converted to the folowing SQL : SELECT t0_o.UNID_UOID FROM WEIGHT t0_o, WEIGHTGROUP t2_o_purchase, WEIGHTGROUP t1_o_sale, WEIGHTGROUP t3_o_declaration WHERE ((t1_o_sale.f_Reference = ?) OR (t2_o_purchase.f_Reference = ?) OR (t3_o_declaration.f_Reference = ?)) AND (t0_o.f_Purchase_UOID=t2_o_purchase.UNID_UOID AND t0_o.f_Sale_UOID=t1_o_sale.UNID_UOID AND t0_o.f_Declaration_UOID=t3_o_declaration.UNID_UOID) The correct SQL would be : SELECT t0_o.UNID_UOID FROM WEIGHT t0_o, WEIGHTGROUP t2_o_purchase, WEIGHTGROUP t1_o_sale, WEIGHTGROUP t3_o_declaration WHERE ( ((t1_o_sale.f_Reference = ?) AND t0_o.f_Sale_UOID=t1_o_sale.UNID_UOID ) OR ((t2_o_purchase.f_Reference = ?) AND t0_o.f_Purchase_UOID=t2_o_purchase.UNID_UOID) OR ((t3_o_declaration.f_Reference = ?) AND t0_o.f_Declaration_UOID=t3_o_declaration.UNID_UOID) ) ---------------------------------------------------------------------- >Comment By: Alexey Loubyansky (loubyansky) Date: 2003-10-06 21:19 Message: Logged In: YES user_id=543482 Fixed in 3.2.2RC5. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=804968&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
