I am not getting the expected results when executing a select statement
containing null values.

I have the following example:

<select id="getSomeRecords"  parameterClass="RecordItem" resultClass="long">
SELECT ColumnUID
WHERE
    Column1 = #property1#
    AND Column2 = #property2#
</select>

In java:

class RecordItem {
  private String property1;
  private String property2;
 ...
}


If I have a RecordItem that has a property1 that has a null value (as read
from a previous SELECT from that table), then when selecting that record
from the table, I would expect it to return the record. Is there something
specific I have to do to get iBATIS to execute a modified SQL that would use
something like:

SELECT ColumnUID
WHERE
  Column1 IS NULL
  AND Column2 = 'property2Value'

Thank you for any hints or direction you may be able to provide.

-- CD

Reply via email to