Re : DataSourceDatabaseTester skip schema information

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re : DataSourceDatabaseTester skip schema information

Sébastien LE CALLONNEC
Hi Arnaud,


It looks like an issue with DbUnit:  it simply doesn't do anything with the schema passed to the DataSourceDatabaseTester.  I guess the code in that class should something similar to what is done JdbcDatabaseTester, that is:

      if( getSchema() != null )
         return new DatabaseConnection( conn, getSchema() );

Looks like an easy fix, but that would obviously require some testing...
 
Regards,
Sébastien.


----- Message d'origine ----
De : Arnaud Brunet <[hidden email]>
À : [hidden email]
Envoyé le : Mardi, 20 Novembre 2007, 8h59mn 32s
Objet : [dbunit-user] DataSourceDatabaseTester skip schema information

Hi,

In my project, I use two types of IDatabaseTester : a DataSourceDatabaseTester and JdbcDatabaseTester.
I create my IDatabaseTester with :
dsTester = new DataSourceDatabaseTester(ds);
dsTester.setSchema( schema.toUpperCase());

and
jdbcTester = new JdbcDatabaseTester(driver, url, user, pass);
jdbcTester.setSchema(schema.toUpperCase());

In Jdbc case, DBUnit use the good schema. But in case of Datasource DBUnit skip the schema. And I have an ambiguous table exception.

Why DBUnit doesn't use schema information for DataSource connection ?


Regards,
Arnaud



Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user