开发者

DBUnit, run insert-select statement

I use DbUnit to load data into a DB for some integration tests. The data is 开发者_如何转开发specified in a flat XML file like so:

<user id="2" name="bob" type="user">
<user id="1" name="john" type="admin">

However in the case of one table, the rows I wish to insert are based on rows already inserted into other tables. The most convenient way for me to achieve this would be by running an insert-select statement, rather than specifying the rows via XML as above. Does DbUnit support loading data via a mixture of insert-select statements and XML in this fashion?

Thanks, Don


I tried lots of different configurations with DbUnit, but all of them were based on plain XML files. I've seen no option to mix them with SELECT statements and I really think this option doesn't exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜