简体   繁体   English

如何在我的审计表中添加一个包含使用 Hibernate Envers 完成的操作(修改、创建、删除)的列?

[英]How can I add in my audit table a column with actions that was done (modify, create,delete) using Hibernate Envers?

I know the type of operations are represented like numbers but can I make them appear as string type ("UPDATE / DELETE / INSERT")我知道操作的类型表示为数字,但我可以让它们显示为字符串类型(“UPDATE / DELETE / INSERT”)

I think rev or revtype show what type of operation is ( I tried edit, delete and insert in this order and that s the result )我认为 rev 或 revtype 显示什么类型的操作(我尝试按此顺序编辑、删除和插入,这就是结果)

This is my product_aud这是我的 product_aud

The change history is stored in the SOME_ENTITY_AUD tables corresponding to the SomeEntity instances.更改历史存储在与 SomeEntity 实例对应的 SOME_ENTITY_AUD 表中。 The SOME_ENTITY_AUD table has a field - REVTYPE - Represented by numbers from 0 to 2: SOME_ENTITY_AUD 表有一个字段 - REVTYPE - 由 0 到 2 的数字表示:

  • 0-ADD 0-加
  • 1-MOD 1-MOD
  • 2-DEL 2-DEL

See more details in the same question. 在同一问题中查看更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM