How can I set a Hibernate Parameter to \"null\"? Example:
Query query = getSession().createQuery(\"from CountryDTO c where c.status = :status and c.type =:t
The javadoc for setParameter(String, Object) is explicit, saying that the Object value must be non-null. It's a shame that it doesn't throw an exception if a null is passed in, though.
An alternative is setParameter(String, Object, Type), which does allow null values, although I'm not sure what Type parameter would be most appropriate here.