Narendra
Narendra

Reputation: 5783

@Audited annotation in Hibernate hbm file

I am using Hibernate as my orm in my application.

Now I want to integrate it with Envers. At present I am generating entity using hbm files. In that case how can I mention in hbm file that generate class must have @Audited annotation.

Thanks,
Narendra

Upvotes: 4

Views: 4092

Answers (1)

jpkroehling
jpkroehling

Reputation: 14061

You don't need to mention it in the HBM. In fact, I think it's not even possible to map Envers-specific behavior for entities in HBM files. But don't worry: you can mix HBM mapping with Envers annotations. You just need to remember to correctly configure Hibernate's main config file, as specified in the Envers documentation: http://docs.jboss.org/hibernate/envers/3.6/reference/en-US/html_single/#config-basics

Upvotes: 2

Related Questions