Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 20387 invoked from network); 14 Apr 2009 02:52:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2009 02:52:29 -0000 Received: (qmail 30021 invoked by uid 500); 14 Apr 2009 02:52:28 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 29990 invoked by uid 500); 14 Apr 2009 02:52:28 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 29981 invoked by uid 99); 14 Apr 2009 02:52:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 02:52:28 +0000 X-ASF-Spam-Status: No, hits=4.0 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of zoran@sparecreative.com designates 150.101.158.37 as permitted sender) Received: from [150.101.158.37] (HELO conads.com) (150.101.158.37) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2009 02:52:18 +0000 Received: by conads.com (CommuniGate Pro PIPE 5.2.11) with PIPE id 6125955; Tue, 14 Apr 2009 12:51:54 +1000 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 3.1.0-19102005 (2005-09-13) on mail.conads.com Received: from [60.242.126.136] (account webhosting HELO sparecreative.com) by conads.com (CommuniGate Pro SMTP 5.2.11) with ESMTPA id 6125953 for user-java@ibatis.apache.org; Tue, 14 Apr 2009 12:51:40 +1000 Received: from [10.0.1.10] (account zoran [10.0.1.10] verified) by sparecreative.com (CommuniGate Pro SMTP 5.2.11) with ESMTPA id 2022388 for user-java@ibatis.apache.org; Tue, 14 Apr 2009 12:51:39 +1000 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Tue, 14 Apr 2009 12:51:38 +1000 Subject: Re: From: Zoran Avtarovski To: iBatis Java Mail List Message-ID: Thread-Index: Acm8q+5JLRzVSCifEd6EBAANkyympA== In-Reply-To: Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3322558299_26846776" X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, HTML_30_40,HTML_MESSAGE autolearn=ham version=3.1.0-19102005 > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3322558299_26846776 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable That=B9s why I=B9ve never managed to get it to work. Can I suggest that for the next version the logic be reversed on inserts. It=B9s not a big deal as it makes sense to implement this type of logic in the business layer but for simple projects it might be beneficial. Z. >=20 > Null value replacement makes my head hurt. >=20 > It bit me, because it worked exactly the OPPOSITE of what I expected. >=20 > When doing a select, if the database value is null, ibatis will use > the replacement value for your result. >=20 > When doing an insert, if the parameter property is the replacement > value, it'll put null in the database. >=20 > So in this case, it's doing nothing. >=20 > :-/ >=20 > However, IIRC, if you set thing.animal to false, it'll use null in the > database instead. >=20 > Larry >=20 >=20 > PS: Hey, aren't you the captain of "The Love Boat"? Oh, no that was > Gavin MacLeod...nevermind. :-P --B_3322558299_26846776 Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Re: That’= ;s why I’ve never managed to get it to work. Can I suggest that for th= e next version the logic be reversed on inserts. It’s not a big deal a= s it makes sense to implement this type of logic in the business layer but f= or simple projects it might be beneficial.

Z.


Null value replacement makes my head hurt.

It bit me, because it worked exactly the OPPOSITE of what I expected.

When doing a select, if the database value is null, ibatis will use
the replacement value for your result.

When doing an insert, if the parameter property is the replacement
value, it'll put null in the database.

So in this case, it's doing nothing.

:-/

However, IIRC, if you set thing.animal to false, it'll use null in the
database instead.

Larry


PS: Hey, aren't you the captain of "The Love Boat"? Oh, no that w= as
Gavin MacLeod...nevermind. :-P

--B_3322558299_26846776--