blob: e858decc96c9d22a830177e2749db33f2ee91f78 [file] [log] [blame]
Title: NULL Handling
<P>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.</P>
<P>For example:</P>
<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java"><SPAN class="code-comment">// <SPAN class="code-keyword">this</SPAN> expression will be translated by Cayenne to the SQL like:
</SPAN><SPAN class="code-comment">// ...WHERE BIRTH_DATE IS NOT NULL
</SPAN>Expression exp = ExpressionFactory.noMatchExp(<SPAN class="code-quote">&quot;birthDate&quot;</SPAN>, <SPAN class="code-keyword">null</SPAN>);
</PRE>
</DIV></DIV>