ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mississippi John Hurt" <johnh...@gmail.com>
Subject Model has int but database is a Number
Date Sun, 20 Aug 2006 02:32:11 GMT
Hi,
What's the best way to handle this? My db column is a NUMBER where 0 has
meaning, so does 1.
My model has a property that's an int. But int's by default are 0 (which
have meaning). So my dynamic map statement cannot tell if the int value of 0
is set by me or by default 0. So other than having another say java boolean
indicator, how can I get around this best? Other than making the property a
Integer object which will force me to add extra java code everywhere to
convert from int to Integer?  Thanks.

Mime
View raw message