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...
A collection of articles and resources of interest to the modern software developer
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs
Thursday, June 23, 2011
Seed data for grails application - Stack Overflow
Seed data for grails application - Stack Overflow
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment