playframework « Map « JPA Q&A

1. Map null column as 0 in a legacy database (JPA)

Using Play! framework and it's JPASupport class I have run into a problem with a legacy database. I have the following class:

public class ProductCatalog extends JPASupport {


2. org.hibernate.exception.SQLGrammarException: could not execute query

I use play framework !! But when I run my project it give me this org.hibernate.exception.SQLGrammarException: could not execute query who can help me ? this is my model:

package models;
import java.util.*;
import javax.persistence.*;
import play.db.jpa.*;
import ...

3. Can I map a SQLServer XML column to a String in Java using JPA?

I am using playframework with a legacy SQL Server 2008 database that has data stored in XML columns. I would like to be able to access the XML from the java ...

4. How do I get many @ManyToMany relationships to work?

I have a model with two many-to-many relationships. Play framework creates the relationship tabel for me, but none of the ids are nullable, resulting with me unable to get my code ...

5. jpql query manytomany

software <-m:n-> tag I want to create query for selecting all softwares where = id I write:

TypedQuery query =

6. How to delete an ManyToMany related object when one part is empty?

Here is the BlogPost model :

@Table(name = "blog_posts")
public class BlogPost extends Model {

7. property mapping has wrong number of columns exception - Play-framework

I am a beginner with play framework.Again a question on JPA and mappings in play framework, I have a student table and a mentor table bound by a one to one relationship. Student ...

8. How to custom query a ManyToMany table using Play, MySQL and Hibernate?

I am new to Play and Hibernate and working on a project. I love it so far! I ran into a new problem recently. I have a table of people. I then ...

9. problem with mapping and created tables when using playframework

I tried to create a webapp consisting of shoppingcart and cartitems using playframework.I created the following mappings and when I tried to run the webapp,I found that the postgres db tables ...

10. ManyToOne cascade not working

In Play Framework! I defined two models : On one hand,

public class DashboardPosition extends Model  {
    public int orderId;

    public Dashboard ...

11. jpa mapping to remove a lone entity

In my java web app(using playframework),I have a Customer having an Address mapped like this

class Customer extends Model{
    Address address;

class Address extends Model{

12. Map a custom type to database column

Let's say I have a model class A who has a member of class B which is not a model. How can make it so that class A can be saved ...

13. How do I use JPA to persist a Map (java.util.Map) object inside an entity and ensure the persistence cascades?

I have recently started playing around with the Play! Framework for Java, version 1.2.3 (the latest). While testing out the framework, I came across a strange problem when trying to persist ...

14. Saving OneToOne mapped object in the database?

I'm trying to save a UserOnline object, which has a OneToOne relationship with User, in the database. I want to create a new one if it doesn't exist, and if it ...