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)
Standard IS NULL instead of "IS EMPTY" works just fine with EJBQL. BTW, I'm not sure if there exist this "EMPTY" in SQL syntax at all.