Replies: 2 comments 4 replies
-
Are you connected to the correct db? |
Beta Was this translation helpful? Give feedback.
-
Hmm. My H2 test setup code is here. That's configuring in code instead; the relevant code is just
Different question: @JonPichel, are you sure that you're creating your tables? A common mistake when using H2 is neglecting this. Since H2 knows nothing about your persistent on-disk database schema, you have to build up the entire schema in memory every time you run the tests. So for example, each of my tests runs this setupDatabase() function before starting, so that the database exists to write into. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm having trouble using H2 in-memory database with Hibernate and Play Java version 2.8.17. I can persist my objects and perform queries without problems, but when I try to run H2-browser it connects to my database but doesn't show my tables or created rows.
I have also tried with IntelliJ Idea's datasources and it also connects but it doesn't display the information from my application.
I don't know what I'm doing wrong, can somebody help me?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions