Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 23955 invoked from network); 2 Nov 2005 14:38:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Nov 2005 14:38:37 -0000 Received: (qmail 57692 invoked by uid 500); 2 Nov 2005 14:38:07 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 57648 invoked by uid 500); 2 Nov 2005 14:38:07 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 57636 invoked by uid 99); 2 Nov 2005 14:38:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 06:38:06 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dev.mansonthomas@gmail.com designates 66.249.82.199 as permitted sender) Received: from [66.249.82.199] (HELO xproxy.gmail.com) (66.249.82.199) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 06:38:02 -0800 Received: by xproxy.gmail.com with SMTP id r21so243696wxc for ; Wed, 02 Nov 2005 06:37:45 -0800 (PST) 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=NTP95R8WAiWRJPBnoFL737m+F8XgNUCMq/zFALHN+hkeSF3rBCfaZQrdVk3p3ftwVNJ0pKtUsYhLtdTbIR0s3pQhfUG1aksCmx1haR+BWtMLuk8oTiVr9iOYdntYSvlHroA4eJH4nhKsJPHrzTG+xTd3RgSljuZ3A9Xk3auhdpc= Received: by 10.64.253.6 with SMTP id a6mr1923503qbi; Wed, 02 Nov 2005 06:37:45 -0800 (PST) Received: by 10.64.196.3 with HTTP; Wed, 2 Nov 2005 06:37:45 -0800 (PST) Message-ID: Date: Wed, 2 Nov 2005 15:37:45 +0100 From: Thomas Manson To: Jakarta Commons Users List Subject: Re: [DBUTILS] integer type not retrieve from the database In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Well, i've already tried this : iddelegation, idDelegation. nothing will do= . Also, i've added a column that don't use the auto-increment feature (juste to try) and it still doesn't work Maybe integer in MySQL 5 metadata has changed? On 11/2/05, Garth Patil wrote: > try renaming the db field to idDelegation. i've never had success with > underscores using dbutils. > /garth > > >From: Thomas Manson > >Reply-To: "Jakarta Commons Users List" > >To: commons-user@jakarta.apache.org > >Subject: [DBUTILS] integer type not retrieve from the database > >Date: Wed, 2 Nov 2005 01:47:35 +0100 > > > >Hi, > > > >I'm trying to use DBUtils (with DBCP) with Java 1.5 and MySQL5. > > > > > >I make this query > > > >query =3D "SELECT idDelegation, nom, departement, testint from > >delegation order by departement asc"; > > > >on this table : > > > >CREATE TABLE `delegation` ( > > `id_delegation` int(10) unsigned NOT NULL auto_increment, > > `nom` varchar(45) NOT NULL, > > `departement` varchar(8) NOT NULL, > > PRIMARY KEY (`id_delegation`) > >) ENGINE=3DInnoDB DEFAULT CHARSET=3Dlatin1; > > > >to be mapped with this object : > > > >public class DelegationDto > >{ > > private int idDelegation; > > private String nom ; > > private String departement ; > > private int testint; > >/*+Getter & Setter*/ > >} > > > > > >(List)this.queryRunner.query(query, new > >BeanListHandler(DelegationDto.class)); > > > >The 2 String columns a retrieved, but not the integer one. I get 0 for > >int and null for Integer type. > > > >Does any one have an idea? Why should it work with string and not with > >integer? Bug?? > > > >Thanks for help, > > > >Manson Thomas. > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > >For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org