Cayenne User Documentation
NULL Handling

Handling of Java nulls as operands is no different from normal values. Instead of using special conditional operators, like SQL does, "equal to" and "not equal to" expressions can be used directly with null values. It is up to Cayenne to translate expressions with nulls to the valid SQL.

For example:

    // this expression will be translated by Cayenne to the SQL like:
    // ...WHERE BIRTH_DATE IS NOT NULL
    Expression exp = ExpressionFactory.noMatchExp("birthDate", null);

When a query is executed with this qualifier, the a SQL String similar to the following will be generated:

    ... WHERE t0.BIRTH_DATE IS NOT NULL

.
Copyright ©2001-2010 Apache Software Foundation