1 Reply Latest reply on Aug 22, 2004 2:21 PM by Stjepan Brbot

    EJB-QL - IS EMPTY

    Junior Carl Newbie


      I'm not sure if the following EJB-QL with the "IS EMPTY" expression is translated correctly by JBoss 3.2.5. Wouldn't the generated SQL return an empty result no matter what?


      <ejb-ql>
       <![CDATA[SELECT OBJECT(s) FROM Service s WHERE s.subscriptions IS EMPTY]]>
      </ejb-ql>
      
      translated to...
      
      SELECT DISTINCT t0_s.service_id FROM service t0_s, subscription t1_s_subscriptions WHERE (t1_s_subscriptions.subs_id IS NULL AND t0_s.service_id=t1_s_subscriptions.service_id)