Hi
Whats the prefered way to handle null values?
// pseudocode
Code:
dao.get(Float value) {
if(value == null) {
query = ..createQuery("select ... where m.value is null");
} else {
query = ..createQuery("select ... where m.value = :value");
query.setFloat("value", value);
}
}
Is not really handy. Is there an easier way to write a more generic dao method?
I hoped that something like query.setFloat("value", value); would be able to deal with null values ;o)
Hibernate version: 3.0.5
thx for your assistence
Bernhard Neuhauser