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);

.
Copyright ©2001-2006 Apache Software Foundation