ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huy <huym...@swiftdsl.com.au>
Subject Re: A question about nullValue in resultMap.
Date Sat, 05 Feb 2005 03:04:19 GMT
Clinton Begin wrote:
> You guys have to understand that this is a tough call for us.  It's
> just such a horrible implicit behaviour that I can't even imagine the
> concequences of it.

> This falls into the category of:  "Feature to support bad design choices."
> Regardless of whether you have control over the database or not, you
> seem to have control over two other things:
> 1) The JavaBean design - You can solve the problem by using Integer
> instead of int (a good design choice).

I'm going a bit OT here, but I'm really interested in this point. I'm 
not exactly a very experienced java programmer but I've never liked to 
use Integer. Is it really the better design choice ? and why ? Is it the 
null thing or is because it makes everything more consistent in terms of 
being objects.

> - OR -
> 2) The SQL Maps - You can solve the problem by specifying nullValue
> attribute of the result mapping (an explicit behaviour and a good
> design choice).

I guess explicit is always better, but I'm a lazy programmer sometimes 
;-) that's one of the reasons why i use SQL Maps, it does so much for me 
automatically (if not automagically).



View raw message