Nope, I see nothing at all in the database. BTW, I am using Play 1.2.3
> Are you seeing NULL values in the DB. I am having a similar problem
> with just NULL values being populated. The same .yml file I have works
> file when called from tests.
> Cheers,
> jeff
> On Nov 1, 7:06 pm, KR <rvkish...@gmail.com> wrote:
> > I am trying to load some bootstrap data into the database on
> > Application startup. I have the following class which does that.
> > -------------------------------------
> > @OnApplicationStart
> > public class Bootstrap extends Job<Bootstrap> {
> > public void doJob() {
> > try{
> > if (Installation.count() == 0) {
> > Logger.debug("Loading data.............");
> > Fixtures.loadModels("initial-data.yml");
> > Logger.debug("Done!");
> > }
> > }
> > catch(Exception exc)
> > {
> > exc.printStackTrace();
> > Logger.error("exception caught!!" + exc);
> > }
> > }}
> > ----------------------------------------------------------------
> > initial-data.yml
> > ---------------------------------
> > Installation:
> > name: "HNC-1"
> > installCode: "HNC-1"
> > description: "Installation -1"
> > Installation:
> > name: "HNC-2"
> > installCode: "HNC-2"
> > description: "Installation -2"
> > -----------------------------------------------------------
> > Installation model class
> > --------------------------
> > @Entity
> > @Table(name = "installation",uniqueConstraints =
> > @UniqueConstraint(columnNames = {"name", "install_code"}))
> > public class Installation extends Model{
> > @Required
> > public String name;
> > @Required
> > @Column(name="install_code")
> > public String installCode;
> > public String description;
> > public Installation(String name, String installCode, String
> > description) {
> > this.name = name;
> > this.installCode = installCode;
> > this.description = description;
> > }}
> > ---------------------------------------------
> > The class is getting called fine and the data import seems to happen,
> > but I don't see anything saved in the database.
> > Any ideas as to why this is happening?
> > Thanks in advance.