Seed data for grails application

Posted by bsreekanth on Stack Overflow See other posts from Stack Overflow or by bsreekanth
Published on 2010-04-24T17:19:49Z Indexed on 2010/04/24 17:23 UTC
Read the original article Hit count: 541

Filed under:
|
|

Hello, What is the best way to load seed (initial or test) data into grails application. I'm considering 3 options 1. Putting everything in *BootStrap.groovy files. This is tedious if the domain classes and test data are many. 2. 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. 3. 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...

© Stack Overflow or respective owner

Related posts about grails

Related posts about seed