ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: A question about nullValue in resultMap.
Date Wed, 02 Feb 2005 13:17:21 GMT
On Wed, 02 Feb 2005 13:07:43 +1100, Huy <huymail@swiftdsl.com.au> wrote:
> Larry Meadors wrote:
> > Just curious: If you can have null values, why are you using primitive
> > values.
> Well primitives are easier to work with in Java IMO.

Not if you need null support. :-)

Which do you need more? Null support or ease of use? You do not get
both, and not even the autoboxing in jdk5 will fix that.

> > You do realize that even if we do not call the setter, the
> > property holder will be set to 0 anyway, right?
> Which I guess is the point, so why do we have to specify this in sqlmap.

So we do not have to force that decision upon other users of the framework. 

IMO, this is not what I would expect from the tool. If there is a null
in a field that cannot accurately represent null values, I want an
error. I want a big, nasty error that makes the lights in the server
room flicker, and sets off alarms. The *last* thing I want is for my
framework to assume that it is supposed to be zero, and just happily
chug along.


View raw message