karq
karq

Reputation: 859

Could not execute JDBC batch update

I have a problem with a entity class. When I run my app with hibernate.hbm2ddl.auto = create, then it create all the other entity tables but not this on. Why is that? And when I create the table by myself and after that try to insert something into it, then I get this error: http://pastebin.com/m4gjxqNC

Here's my entity class: User entity: http://pastebin.com/YXvzFSgt Comment entity: http://pastebin.com/RpZEUPxN

And here's the UserDAO class http://pastebin.com/LrTCg0GC

Upvotes: 0

Views: 3098

Answers (1)

gouki
gouki

Reputation: 4402

You seems to be using PostgreSQL. As per this document, 'User' is a PostgreSQL reserved word. Try adding a @Table("user_tb") annotation for your User entity, to force a new table name.

@Entity
@Table("user_tb")
public class User extends LightEntity implements Serializable {
 //..

}

Upvotes: 1

Related Questions