All Questions

Tagged with
Filter by
Sorted by
Tagged with
26votes
2answers
12kviews

Accessing play project database with h2-browser

I am having some trouble accessing the mem database via the h2-browser on a Play framework project. With the configuration below, that I think is the correct one (apparently not!) I am getting a h2-...
user avatar
  • 19k
14votes
1answer
12kviews

How to use a persistent H2 database in the Play Framework instead of in-memory

The H2 database used in the Java Todo List tutorial is the following: db.default.driver=org.h2.Driver db.default.url="jdbc:h2:mem:play" How do I modify the configuration file to use a persistent ...
user avatar
  • 8,935
14votes
3answers
9kviews

Access mem or fs database tables using H2 console

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 ...
user avatar
10votes
3answers
15kviews

Resetting autoincrement in h2

I'm testing a controller that returns a json response but the tests fail after the first time because the h2 database does not reset the auto increment id. Using fixtures or creating objects manually ...
user avatar
9votes
4answers
8kviews

Unknown data type "JSONB" when running tests in play slick with H2 Database

I have evolution problem Unknown data type: "JSONB" when running tests in playframework using playframework v2.6.6 for scala play-slick v3.0.2 play-slick-evolutions v3.0.2 postgresql - 42.0.0 ...
user avatar
  • 129
7votes
1answer
3kviews

Play! not shutting down H2 correctly

I'm using Play to write a webapp which is deployed in Tomcat. Because the app won't be processing very much data I'm using the default H2 database with Hibernate. When I want to deploy a new version ...
user avatar
  • 3,974
6votes
2answers
5kviews

How to connect to Play Framework in-memory database using JDBC?

I use the in-memory database that comes with Play Framework, when I have db=mem in the configuration file, for development. How can I connect to this database using JDBC? and not the JPA that is the ...
user avatar
  • 108k
6votes
1answer
1kviews

Play Framework Ebean BigDecimal fraction

I am using the Play Framework with Ebean and H2 database. The problem is, the BigDecimal results in the DB script as: sum decimal(38), but what I want is: sum ...
user avatar
6votes
1answer
252views

How to check in Play Framework if a unit test performed a database insert/update/delete

I've got a base class that all my controller tests extend. This is set up so each unit test can have its own Fixture to load from. So the @Before override will check what the required fixture for the ...
user avatar
  • 13.7k
5votes
2answers
4kviews

How to access the development database with the Play! framework?

I want to see the tables of my Play! application with the H2 console, but all I see is a list of internal tables of the db engine. How can I view the tables of my application?
user avatar
  • 82.9k
4votes
2answers
6kviews

How to fake ENUM columns in the H2 database for play unit testing?

I have a set of Play! unit tests that I have been running against an H2 database. I have added some enum columns to my model, and the tests now fail because of the sql statements used to create my ...
user avatar
  • 93
4votes
2answers
812views

In Play, can I apply different Evolutions depending on database type?

My Play application uses postgres. It includes some postgres-specific evolutions which prevents me from using an in-memory h2 database for testing. For example, the following evolution is fine in ...
user avatar
  • 1,908
4votes
2answers
515views

Play Framework: How do I change the sort order of my database?

I have a Play app with db=mem in my application.conf file, and I want to be able to set the database's collation to French, with strength set to primary. Any idea how to do this? If I add db.url=...
user avatar
  • 2,959
4votes
1answer
2kviews

Access Play framework's embedded H2 database when in production mode

Is there a way to access Play framework's embedded H2 database (db=fs in application.conf) when the application is in prod mode? (like with the /@db url, which doesn't work in this mode) I use Play ...
user avatar
  • 608
4votes
2answers
1kviews

Playframework evolutions files compatible with both postgres and h2

I've been developing a web site with the Play framework (scala) using H2 as a backend. Testing is nicely integrated, especially with the ability to run tests against an in-memory H2 db. Now I'd like ...
user avatar
  • 6,530

15 30 50 per page
1
2 3 4 5