playframework « Test « JPA Q&A

1. bi-directional in test_data.yml

If i have this code

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

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 org.junit.Test;
import play.db.jpa.JPA;
import play.db.jpa.Transactional;
import play.mvc.Scope.Session;
public class PlaylistTest {

3. Play Framework Junit test case Db error

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?

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 ...