commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Manson <>
Subject [DBUTILS] integer type not retrieve from the database
Date Wed, 02 Nov 2005 00:47:35 GMT

I'm trying to use DBUtils (with DBCP) with Java 1.5 and MySQL5.

I make this query

query = "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`)

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:
For additional commands, e-mail:

View raw message