Previously I store 0 when maxLength and scale is null. However, 0 is a valid value for scale. I change it to Integer.MIN_VALUE to indicate that it is actually NULL.