4

(Newbie DBUnit question Alert!)

It appears that DBUnit for each table 'deletes all the records from a table and then does its insert operation'.

This means that you can't use the xml load file order to clear the data down as any constraining record would be deleted and recreated before the records can be removed from the other tables (I hope that makes sense!).

If there system 'deleted all' from all tables in the xml in order (reversed or otherwise) this problem would not exist.

So is there a way of making it do this?

I am using MS SQL with InsertIdentityOperation(DatabaseOperation.CLEAN_INSERT).

Cheers.

Michael
  • 518
  • 5
  • 13

1 Answers1

0

Inherited DBTest and added a delete all step to setup for running the normal routine.

Clean_Insert then becomes "automatic Delete_all" + Insert in getSetUpOperation.

Michael
  • 518
  • 5
  • 13