NH-1863: Fixed parameter type so databases that don't map bools to ints work properly.