I have a column in the DB which is number(8,0) The type in the POJO is long. This is an optional value, is there any way I can set NULL for this column where there is no data, right now its being set to 0 when there is no data.
posted 9 years ago
I haven't tried this myself so cannot say for sure if it would work. Can you please try to use a Long object instead of a primitive long? By default primitve long and int variables are assigned a value of 0. Objects on the other hand are assigned a null value.