Work around for envers auditing for bulk update

╄→尐↘猪︶ㄣ 提交于 2019-12-01 23:44:20

The documentation is correct. HQL and native SQL operations are not audited.

Since the performance of the bulk update will be affected by auditing, you may wish to change your design - for example, if you have a parent entity with related children, and you are performing a bulk update on the child records, you could update attributes of the parent record and then call saveOrUpdate after doing the bulk update.

Another option, is to manually perform the bulk update on the audit table(s) also, but its not going to be elegant. I managed to get around the issue in my case by changing the design as per the above.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!