Play framework JPA problem with save()
问题 I'm trying to save a simple object in the database, but it's giving me problems. This is my object class: @Entity @Table(name="lines") public class Line extends GenericModel{ @Id @Column(name="line_id") private int id; @Column(name="line_text") private String text; @Column(name="line_postid") private int postid; @Column(name="line_position") private int position; } And this is what I have in my controller: Line l = new Line(); l.setPosition(0); l.setPostid(4); l.setText("geen"); l.save(); I'm