|
From: Matthias G. <Mat...@we...> - 2009-04-01 20:50:43
|
Hi Dmitry, the AbstractDataSet.createIterator() method controls the order of the tables. So you might succeed in overriding this method in the FlatXmlDataSet... regards, matthias > -----Ursprüngliche Nachricht----- > Von: "Dmitry Beransky" <dmi...@gm...> > Gesendet: 01.04.09 22:29:47 > An: dbu...@li... > Betreff: [dbunit-user] delete order > I thought, when cleaning a database, DBUnit deletes records in reverse > syntactic order, but this isn't happening. Here's my xml data set: > > <dataset> > <acompany company="comp" companyname="company name"/> > > <adept dept="DEPT" deptname="deptname" company="comp"/> > > <saproducer contactname="Joe Blaux" producercode="P0324095" > dept="DEPT" salestaxflag="1" emailaddress="prod0324095@local"/> > > <saprodmod/> > > <uwproduct/> > > <uwprodmod/> > > <saprodmod/> > > </dataset> > > I've enabled debugging in > org.dbunit.database.statement.SimpleStatement, and here's what I'm > seeing: > > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.addBatch:54 | addBatch(sql=delete from uwprodmod) - > start > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.addBatch:54 | addBatch(sql=delete from uwproduct) - > start > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.addBatch:54 | addBatch(sql=delete from saprodmod) - > start > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.addBatch:54 | addBatch(sql=delete from saproducer) - > start > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.addBatch:54 | addBatch(sql=delete from adept) - start > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.addBatch:54 | addBatch(sql=delete from acompany) - > start > 11:55:12 - successfullyLogInAsProducer:DEBUG - > SimpleStatement.executeBatch:60 | executeBatch() - start > > The order of deletes is different from that in the xml file. Is there > another setting that controls this behavior? > > Thanks > Dmitry > > ------------------------------------------------------------------------------ > _______________________________________________ > dbunit-user mailing list > dbu...@li... > https://lists.sourceforge.net/lists/listinfo/dbunit-user > __________________________________________________________________________ Verschicken Sie SMS direkt vom Postfach aus - in alle deutschen und viele ausländische Netze zum gleichen Preis! https://produkte.web.de/webde_sms/sms |