Was wondering, what steps am I missing to get a jdbc embeded h2 database working in my play application? Following these docs.
- So far editted Application.conf file to contain this: db.default.driver=org.h2.Driver db.default.url="jdbc:h2:databases/test" db.default.user=test db.default.password="testtest"
- Next I created a libs directory and added the jar file h2-1.3.174.jar Is this necessary or does the provided driver handle all types of h2 databases (embeded and server - I know it handles in memory)?
- Now in the controler how can I access the database? Do I have to start/shutdown the database?
- I know I can get connections from the getConnection() method in play.db. But everytime I execute a statement through this connection I get an exception saying no data is available. If I then check - looks like directory databases/test was not created so no database files exist.
What am I missing?