Return-Path: Delivered-To: apmail-ibatis-user-cs-archive@www.apache.org Received: (qmail 8128 invoked from network); 24 Sep 2006 16:57:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Sep 2006 16:57:02 -0000 Received: (qmail 81630 invoked by uid 500); 24 Sep 2006 16:57:02 -0000 Delivered-To: apmail-ibatis-user-cs-archive@ibatis.apache.org Received: (qmail 81444 invoked by uid 500); 24 Sep 2006 16:57:02 -0000 Mailing-List: contact user-cs-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-cs@ibatis.apache.org Delivered-To: mailing list user-cs@ibatis.apache.org Received: (qmail 81433 invoked by uid 99); 24 Sep 2006 16:57:02 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Sep 2006 09:57:02 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=ibatis.net@gmail.com; domainkeys=good Authentication-Results: idunn.apache.osuosl.org smtp.mail=ibatis.net@gmail.com; spf=pass X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE Received-SPF: pass (idunn.apache.osuosl.org: domain gmail.com designates 64.233.166.179 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from [64.233.166.179] ([64.233.166.179:41305] helo=py-out-1112.google.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 16/41-10787-AD8B6154 for ; Sun, 24 Sep 2006 09:57:00 -0700 Received: by py-out-1112.google.com with SMTP id b29so2108533pya for ; Sun, 24 Sep 2006 09:56:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Nu+B+8/KqrReqi4ISpDByIAWVBbffX4DpegDV3megxP2rQBk3kgrGSICJXrmOoI+LkpyHJ7xN//ox134CGN3F+eaQ00nY8RQdrx2dsRAHcIdLHcNShPX1rfJLfXJjsADvgiaYWi5rzRY+pTX+g/ZZEOVRBro9bChoxxyquzU51E= Received: by 10.35.78.13 with SMTP id f13mr6371369pyl; Sun, 24 Sep 2006 09:56:56 -0700 (PDT) Received: by 10.35.111.4 with HTTP; Sun, 24 Sep 2006 09:56:55 -0700 (PDT) Message-ID: Date: Sun, 24 Sep 2006 18:56:56 +0200 From: "Gilles Bayon" To: user-cs@ibatis.apache.org Subject: Re: Obtaining error messages instead of null values for bad data cases? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Perhaps must you use a custom type handler. On 9/22/06, Per Magne Bjornerud wrote: > I'm using iBatis to let the user upload data with CSV files. > > Some fields map to integer values in the object. If the CSV file > contains an mapping to an int field, but the CSV file contains a string > value - then iBatis maps this to 0. (or null for nullable types) > > This causes the following issue: For CSV files with optional fields, I > cannot tell if the fields with null values are due to allowed null > values or bad data. And I need to know about the cases with bad data. > > Is there any way to obtain this information when mapping with iBatis? > > -- > Per Magne Bjornerud > -- Cheers, Gilles Wish List