nhibernate envers: auditing an entity already in production

一笑奈何 提交于 2019-12-23 17:14:05

问题


We have an application that is already in production and it is using Envers to do auditing.

Now we are going to release an update in which we audit a new kind of entity. However this entity already exists in the production environment, only it was not audited so far.

We have tried in a test environment containing existings records, and it crashes upon saving because Envers cannot find a previous revision for the entity being saved.

What is the approach to takle this issue ?

It would be great for instance if one could specify the date from which an entity should be audited.


回答1:


You have to, manually, write a script for this. Shouldn't be that hard, just create a single row in your revision table and write "insert audit records" for this revision for all your audited entities.



来源:https://stackoverflow.com/questions/31245457/nhibernate-envers-auditing-an-entity-already-in-production

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