rmpestano / dbunit-rules

https://github.com/database-rider/database-rider
14 stars 5 forks source link

Tables are being reordered when loading YamlDataSet #56

Open vogoltsov opened 7 years ago

vogoltsov commented 7 years ago

I got an FK violation error when loading data using YamlDataSet. Turns out the table data was being inserted in the wrong order (compared to the order in .yml file). I guess the problem lies here: private Map<String, MyTable> tables = new HashMap<String, MyTable>(); To retain table order from yaml data file, HashMap must be replaced with LinkedHashMap.

rmpestano commented 7 years ago

Hi @vogoltsov,

This project was moved to database rider org, please fill an issue there. I think we still use HaspMap so the issue may be present there also.

It would be great if you could provide a test case plus a PR. Thank you.