playframework « Data Type « JPA Q&A





1. many to many and integrity when saving the null    stackoverflow.com

I have two classes Software, Tag - they are related by ManyToMany. We CAN NOT create Software without putting the Tag to it. I want to write a test which check that: @Test ...

2. persist Joda-time's DateTime via JPA    stackoverflow.com

I'm using Jodatime in my Play app, but currently having to do a bunch of converting back and forth from/to java.util.Date and java.sql.Time. Since jodatime is included in the Play distribution, ...

3. How can I store enums with fixed values in play    stackoverflow.com

I'm trying to convert a grails-project to the playframework. In Grails you can define an id so the the id will be stored in the database (see Enhanced Enum Support in ...

4. Creating a two dimentional array in the Play! Framework    stackoverflow.com

I'm trying to store a table of data in a two dimensional collection. Whenever I:

@OneToMany
public List<List<Cell>> cells;
I get a JPA error: JPA error A JPA error occurred (Unable to build EntityManagerFactory): Use of @OneToMany ...

5. Cannot persist hashmap with JPA    stackoverflow.com

I am struggling trying to persist a map to SQLserver with the code below and keep getting the following error: * Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'OnlineReport_availabilities'. * I use Play framework ...

6. Date in Playframework    stackoverflow.com

I have Model which has Date information:

package models;
import java.util.Date;
import javax.persistence.*;

import play.data.binding.As;
import play.db.jpa.*;
@Entity
public class testing extends Model {
…
public  Date date;
// I even tried public @As("yyyy-MM-dd") Date date;

…
public test1 {…date…}
}
Then I have ...