How to insert new items with Hibernate?

前端 未结 3 594
花落未央
花落未央 2021-01-02 02:17

I have an entity class called Task which is mapped in hibernate.

I\'m able to fetch existing items belonging to this class correctly, so I don\'t think

3条回答
  •  遥遥无期
    2021-01-02 02:51

    I accidentally removed hibernate_sequence table in my db. Change:

    spring.jpa.hibernate.ddl-auto=none
    

    to

    spring.jpa.hibernate.ddl-auto=create
    

    In your application.properties file so Hibernate could recreate this table by himself

提交回复
热议问题