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