Share

DbUnit

Tracker: Bugs

5 Nullable tinyint on mysql cannot be inserted - ID: 2831696
Last Update: Comment added ( gommma )

This is my table definition.
create table example(name varchar(25),id int(50) not null,m1 tinyint(1))
This is my XML file

<?xml version='1.0' encoding='UTF-8'?>
<dataset>
<table name="example">
<column>name</column>
<column>id</column>
<column>m1</column>
<row>
<value>robi</value>
<value>1</value>
<value></value>
</row>
</table>
</dataset>

while populating data dbunit expect a value for m1, but it is a nullable
column.Only for type tinyint dbunit expect a value even if it is a nullable
column. But i want to populate data without a value for the column m1.

TestCase:

public void testIt() throws Exception{
IDataSet ds = new
XmlDataSet(getClass().getResourceAsStream("dataset.xml"));
IDatabaseConnection dbConn =
MySqlTinyintTest.getDbUnitConnection();
DatabaseOperation.INSERT.execute(dbConn, ds);
}

Thanks to kalpana for reporting this one.


matthias g ( gommma ) - 2009-08-03 21:03

5

Closed

Fixed

matthias g

Bug

None

Public


Comments ( 2 )

Date: 2009-08-03 21:11
Sender: gommma

Your fix has been accepted and committed to the project repository.

Thank you!


Date: 2009-08-03 21:11
Sender: gommma

Hi Kalpana,

I fixed the bug on the current trunk rev. 1023. You can soon retrieve the
latest build from the parabuild server for your verification testing (see
http://parabuild.viewtier.com:8080/parabuild/index.htm?view=detailed&buildid=30&displaygroupid=13
for the download) .

thanks and regards,
matthias


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2009-08-03 21:11 gommma
resolution_id None 2009-08-03 21:11 gommma
allow_comments 1 2009-08-03 21:11 gommma
close_date - 2009-08-03 21:11 gommma