JPA: update only specific fields

前端 未结 7 2048
自闭症患者
自闭症患者 2020-12-02 14:02

Is there a way for updating only some fields of an entity object using the method save from Spring Data JPA?

For examp

7条回答
  •  独厮守ぢ
    2020-12-02 14:44

    the problem is not spring data jpa related but the jpa implementation lib that you are using related. In case of hibernate you may have a look at:

    http://www.mkyong.com/hibernate/hibernate-dynamic-update-attribute-example/

提交回复
热议问题