I would like to ask for advice about Spring JPA and hibernate during modifying objects. Maybe it depends on design pattern or something.
There are two possibilities:
Could you answer and explain why/when use which ?
答案 0 :(得分:0)
JPA旨在以您描述为选项1的方式使用:
加载实体,修改它并(隐式地)在提交事务/会话时保存它。