Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop Dynamic and EJB query > Develop applications that use EJB query > EJB query language > WHERE clause


EMPTY collection predicate

We can use the EMPTY collection predicate to test if a multivalued relationship has no members.

Use the following syntax:

collection-valued-path-expression  IS [NOT]  EMPTY


Example: Empty collection predicate

To find all departments with no employees:

SELECT OBJECT(d) FROM DeptBean d  WHERE  d.emps IS EMPTY

EJB query language
WHERE clause
Use EJB query

+

Search Tips   |   Advanced Search