开发者

Could not execute JDBC batch update

开发者 https://www.devze.com 2023-03-10 09:53 出处:网络
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 my

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

He开发者_如何学运维re'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


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

}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号