问题
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