0

i have a class User which extends Ebean Model. And i defined a dbfile in my application.conf and by starting h2, it is creating the dbfile. my quesion is:

do i have to create my User Table manually in H2 Console in DB? or does Ebean create it automatically. if Ebean does, how and where i will see User Table in DB? i am confused a little bit..

thanks for clarification in advance!

ndeverge
  • 21,378
  • 4
  • 56
  • 85
doniyor
  • 36,596
  • 57
  • 175
  • 260

1 Answers1

1

You should use the evolutions.

So you must create a SQL file under conf/evolutions/default/1.sql (assuming that in application.conf your database is under "default"). This file must contain your CREATE TABLE statements, and it will be executed on Play startup.

ndeverge
  • 21,378
  • 4
  • 56
  • 85
  • ebean will create this statements automatically? – doniyor Jun 29 '12 at 10:44
  • okay, i see, ebean is creating the file itself once i run the app. now i have another question of how to save the values got from post into Model fields.. :D. Nico, any ideas? :)) – doniyor Jun 29 '12 at 10:57