2 Replies Latest reply on May 22, 2002 2:07 AM by Henk Laracker

    Converting EJB-ql to SQL goes wrong

    Henk Laracker Newbie

      The ejb statement is :
      select object(o) from TaskDB as o where (o.relWaDB.relCodesDB.code = ?1 or o.relWaDB.code = ?1)

      the sql statement generated by jboss is :

      SELECT t0_o.syscode
      FROM TASK t0_o
      , WA t2_o_relWaDB
      , CODES t1_o_relWaDB_relCodesDB
      WHERE t1_o_relWaDB_relCodesDB.code = ?
      OR t2_o_relWaDB.code = ?
      AND ( t0_o.wa_syscode=t2_o_relWaDB.syscode
      AND t2_o_relWaDB.project_syscode=
      t1_o_relWaDB_relCodesDB.syscode)

      The braces in the ejb-ql statement are not present in the sql statement. This results in a different result then expected. What do i have to do the get the braces in the sql statement?