Hello, What is the best way to load seed (initial or test) data into grails application. I'm considering 3 options
- Putting everything in *BootStrap.groovy files. This is tedious if the domain classes and test data are many.
- Write custom functionality to load it through xml. May not be too difficult with the excellent xml support by groovy, but lot of switch statements for different domain classes.
- Use Liquibase LoadData api. I see you can load the data fairly easy from csv files.
Choice 3 seems the easiest. But, I'm not familiar with Liquibase. Is it good in this scenario, or only used for migration, db changes etc. If anyone could provide a better sol, or point to an example with Liquibase, it would be great help..
thanks...