Marc,
>What's wrong here?
>(I want to query the field ROLE_ID for "null"-values.)
The Turbine criteria is based on a hashtable so adding a string "null" or
java null to the criteria is different to querying for a null database
record through SQL. This is the method we use to query a MySQL database for
a Null value. MySQL requires "IS NULL" as part of the SQL query;
public SimpleCriteria isNull(String columnname)
{
super.add(columnname,
(Object)(columnname + " IS NULL"),
Criteria.CUSTOM);
return this;
}
We wrapped the call up into a SimpleCriteria object which extends Criteria
to simplify a lot of the calls for the MySQL database we are using.
Hope that helps.
Cameron Riley
--
To unsubscribe, e-mail: <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>