@GeneratedValue(strategy = GenerationType.AUTO) not working as thought

前端 未结 7 994
予麋鹿
予麋鹿 2020-12-14 18:09

I\'m trying to persist an object to a database. Keep getting \'Column ID cannot accept null value error\'. My object looks like this:

    @Entity
public cl         


        
7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 18:34

    Or try with @GeneratedValue(strategy = GenerationType.AUTO) instead of @GeneratedValue(strategy = GenerationType.SEQUENCE).

提交回复
热议问题