playframework « Test « JPA Q&A





1. bi-directional in test_data.yml    stackoverflow.com

If i have this code

@Entity
public class Category extends Model {

    public String title;

    public Category() {}

    public Category(String title) {
   ...

2. On accessing database through test I get play.exceptions.JPAException: The JPA context is not initialized    stackoverflow.com

I am trying to access the database through a class using PlayFremwork and writing a test

import static org.junit.Assert.*;
import javax.persistence.EntityManager;
import models.com.vlist.entity.classes.Playlist;
import org.junit.Test;
import play.db.jpa.JPA;
import play.db.jpa.Transactional;
import play.jobs.OnApplicationStart;
import play.mvc.Scope.Session;
public class PlaylistTest {
@Test
  ...

3. Play Framework Junit test case Db error    stackoverflow.com

Am new to play framework and Junit. Have little bit knowledge in java. Based on play framework getting started and documentation am started to write unit tests for play application. When ...

4. How to fake ENUM columns in the H2 database for play unit testing?    stackoverflow.com

I have a set of Play! unittests that I have been running against an H2 database. I have added some enum columns to my model, and the tests now fail because ...