DatabaseOperation.CLEAN_INSERT

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

DatabaseOperation.CLEAN_INSERT

Tejash Shah

We're using the FlatXMLDataSet to export a single table to an xml file.

 

FlatXmlDataSet.write(dataToExport, new FileOutputStream(

                        getExportFilename(tableName)));

 

In a different test case, we're using the CLEAN_INSERT operation to load the data to the test env.

 

            DatabaseOperation.CLEAN_INSERT.execute(getDestDC(), emptyDestDBData);

 

 

This is a sample data from the exported file.

 

  <TestTableA id="101" table_name="AAA" process_group_id="1" max_date_updated="1970-01-01 00:00:00.0" row_count="0" max_id="0" min_id="0" date_updated="2011-02-07 21:29:50.843"/>

 

It inserts this data but the process_group_id column is not properly restored to 1 (all other columns are correctly set).  The only thing different about process_group_id I see is that it's a nullable column. 

 

Is there a different way to export nullable data?  Are there any other suggestions to get this to work?

 

Thanks,

Tejash

 

 


NOTICE: This e-mail message and any attachments may contain confidential, proprietary, or privileged information.  If you are not the intended recipient, please notify us immediately by return e-mail, delete this message, and destroy all physical and electronic copies. Thank you.




------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: DatabaseOperation.CLEAN_INSERT

Roberto Lo Giacco
Is the value of that column null on the very first row of your
dataset? In that case you should enable the columnSensing feature in your test
case.

http://www.dbunit.org/faq.html#differentcolumnnumber

On Tue, Feb 22, 2011 at 16:14, Tejash Shah
<[hidden email]> wrote:

>
> We're using the FlatXMLDataSet to export a single table to an xml file.
>
>
>
> FlatXmlDataSet.write(dataToExport, new FileOutputStream(
>
>                         getExportFilename(tableName)));
>
>
>
> In a different test case, we're using the CLEAN_INSERT operation to load the data to the test env.
>
>
>
>             DatabaseOperation.CLEAN_INSERT.execute(getDestDC(), emptyDestDBData);
>
>
>
>
>
> This is a sample data from the exported file.
>
>
>
>   <TestTableA id="101" table_name="AAA" process_group_id="1" max_date_updated="1970-01-01 00:00:00.0" row_count="0" max_id="0" min_id="0" date_updated="2011-02-07 21:29:50.843"/>
>
>
>
> It inserts this data but the process_group_id column is not properly restored to 1 (all other columns are correctly set).  The only thing different about process_group_id I see is that it's a nullable column.
>
>
>
> Is there a different way to export nullable data?  Are there any other suggestions to get this to work?
>
>
>
> Thanks,
>
> Tejash
>
>
>
>
>
> ________________________________
>
> NOTICE: This e-mail message and any attachments may contain confidential, proprietary, or privileged information.  If you are not the intended recipient, please notify us immediately by return e-mail, delete this message, and destroy all physical and electronic copies. Thank you.
>
> ________________________________
>
> ------------------------------------------------------------------------------
> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
> Collect, index and harness all the fast moving IT data generated by your
> applications, servers and devices whether physical, virtual or in the cloud.
> Deliver compliance at lower cost and gain new business insights.
> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user