hibernate envers does not get triggered for jpa queries

时光怂恿深爱的人放手 提交于 2019-12-22 10:38:06

问题


I am using hibernate envers to audit events and it works fine along with Spring Data JPA Repository when i invoke repositoy.delete() or repository.save()

But If I write a jpa query and delete the entity using a query , then it hibernate envers audit listener does not get invoked.

I read that hibernate envers will not trap native query - But will it not work for hibernate/jpa queries as well ?

Thanks Lives


回答1:


As mentioned in this and this post, envers is not triggered in your situation.

Also check out this related question in the JBoss forum



来源:https://stackoverflow.com/questions/23223212/hibernate-envers-does-not-get-triggered-for-jpa-queries

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