org.postgresql.util.PSQLException: ERROR: column user0_.id does not exist - Hibernate

后端 未结 6 2157
野性不改
野性不改 2021-02-05 02:47

I have a model class that is mapped to a postgres database using hibernate. My model class is:

@Entity
@Table(name=\"USER\")
public class User {

    @Id 
    @G         


        
6条回答
  •  梦毁少年i
    2021-02-05 03:42

    Use: @GeneratedValue(strategy = GenerationType.IDENTITY)

    In your POJO class Id Field. This thing solved my error.

提交回复
热议问题