问题描述
如何使用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表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!