禁止使用Hibernate Envers为实体创建_AUD表? [英] Disable creation of _AUD tables with Hibernate Envers for entities?

查看:114
本文介绍了禁止使用Hibernate Envers为实体创建_AUD表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Hibernate Envers禁止为实体创建_AUD表? 我只想通过使用AuditListeners进行自定义审核,而不是允许控件休眠以创建表.

How to disable creation of _AUD tables with Hibernate Envers for entities ? I want do custom audit just by using the AuditListeners instead of allowing control to Hibernate to create tables.

推荐答案

简短的答案:只是不要用@Audited批注标记您的实体.

Short answer: just do not mark your entities with @Audited annotation.

很长一段:您可能正在混合使用这些概念. Envers与EntityListeners无关,这是一个休眠概念.如果您想手动实施审核,则可能根本不需要envers,只需休眠就足够了.

Long one: you're probably mixing these concepts. Envers has nothing to do with EntityListeners, that is a hibernate concept. If you want to manually implement auditing you're probably don't need envers after all, just hibernate will be enough.

这篇关于禁止使用Hibernate Envers为实体创建_AUD表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆