I had assumed it was - but I don't see my seed data in the database.
Bootstrap is run successfully (I see the seed data in the database) when using run-app.
If not, is there a way to make it run?
I had assumed it was - but I don't see my seed data in the database.
Bootstrap is run successfully (I see the seed data in the database) when using run-app.
If not, is there a way to make it run?
It is run in all environments. Simple enough to test - just add a println in the init closure.
In addition, I find it useful to enable exceptions for failed validation in BootStrap:
You'll then know pretty quickly if validation errors are preventing your data from being saved to the database.Code:class BootStrap { def init = { def a = new Author().save(failOnError: true) ... } }
Of course, it was due to invalid seed data.
Thanks for the failOnError tip.