Access mem or fs database tables using H2 console

Sedir Morais picture Sedir Morais · Jun 7, 2011 · Viewed 8.5k times · Source

I'm trying to access my application's tables in Play! Framework, but I can't find it using the console. For instance, I have two entity models: Address and Campus.

I can create objects and save normally, but I would like to see the changes in fs or mem DB, but the H2 console doesn't show the tables Address and Campus. I'm using the default settings to log in localhost:9000/@db.

What am I doing wrong?

Thanks in advance.

Answer

Juan Ramón Paniagua picture Juan Ramón Paniagua · Jun 9, 2011

The correct URL for the inmemory database is:

jdbc:h2:mem:name-of-your-play-db