4

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

skaffman
  • 398,947
  • 96
  • 818
  • 769
Narendra
  • 5,635
  • 10
  • 42
  • 54

1 Answers1

2

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

jpkroehling
  • 13,881
  • 1
  • 37
  • 39