Re: Null columns fail to persist if they are empty, only if datatype is tinyint

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Null columns fail to persist if they are empty, only if datatype is tinyint

kalpana prakasam

Hi,
   I am using dbunit 1.0-beta-3 version.I am
 using a table com_user and this is my table definition
   create table com_user (
     id int(10) unsigned not null
auto_increment,
     first_name varchar(255) not null,
     middle_name varchar(255) null,
     last_name varchar(255) not null,
     name_prefix tinyint(1) unsigned null,
     name_suffix tinyint(1) unsigned null,
     nick_name varchar(255) null,
     loginid varchar(255) not null,
     password varchar(255) not null,
     gender tinyint(1) unsigned null,
     birth_date date null,
     locale varchar(20) null,
     timezone varchar(255) null,
     creation_date timestamp not null default
 CURRENT_TIMESTAMP,
     modified_date timestamp not null,
     primary key (id)
 ) ENGINE=InnoDB;


 My problem is name_suffix is a nullable column but while populating data it showing embedded error,dbunit expects a value there.If I changed the type tinyint as varchar dbunit accepts a nullable column.Is there any solution .



      See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Null columns fail to persist if they are empty, only if datatype is tinyint

Matthias Gommeringer
Hi,

the latest dbunit version is 2.4.5. Could you please try this one out and report if the error still occurs?

thanks,
matthias


> -----Ursprüngliche Nachricht-----
> Von: "kalpana prakasam" <[hidden email]>
> Gesendet: 29.07.09 06:18:28
> An: [hidden email]
> Betreff: Re: [dbunit-user] Null columns fail to persist if they are empty, only if datatype is tinyint


>
> Hi,
>    I am using dbunit 1.0-beta-3 version.I am
>  using a table com_user and this is my table definition
>    create table com_user (
>      id int(10) unsigned not null
> auto_increment,
>      first_name varchar(255) not null,
>      middle_name varchar(255) null,
>      last_name varchar(255) not null,
>      name_prefix tinyint(1) unsigned null,
>      name_suffix tinyint(1) unsigned null,
>      nick_name varchar(255) null,
>      loginid varchar(255) not null,
>      password varchar(255) not null,
>      gender tinyint(1) unsigned null,
>      birth_date date null,
>      locale varchar(20) null,
>      timezone varchar(255) null,
>      creation_date timestamp not null default
>  CURRENT_TIMESTAMP,
>      modified_date timestamp not null,
>      primary key (id)
>  ) ENGINE=InnoDB;
>
>
>  My problem is name_suffix is a nullable column but while populating data it showing embedded error,dbunit expects a value there.If I changed the type tinyint as varchar dbunit accepts a nullable column.Is there any solution .
>
>
>
>       See the Web&#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user