我是在開始我的應用程序使用這2個休眠註解。休眠@DynamicUpdate(值=真)@SelectBeforeUpdate(值=真)表現
@DynamicUpdate(value=true)
@SelectBeforeUpdate(value=true)
首先我會試着解釋我對它的理解,以瞭解我是否正確。
@DynamicUpdate(value=true)
更新只在實體Hibernate needs to track those changes
@SelectBeforeUpdate(value=true)
的modified values
創建update
前select
知道哪個屬性已經改變,這是有用的,當實體已經被加載和更新不同的會話Hibernate is out of tracking entity changes
是這2個肯定是否正確?
我主要關注的是。
在DB performance
這是更好或更快更新所有的在實體領域的一次或generate a select to know which columns update and update only the modified columns?
你找到一個答案? – membersound
還沒有...好傷心... – chiperortiz