0

So far I've not seen any examples where the classes are using hibernate mapping. They all seem to use annotations. Would it work if I use mappings to wire the classes?

AppSensei
  • 8,270
  • 22
  • 71
  • 99

2 Answers2

2

It's not possible. The unique way to work with Envers is by annotations.

Look: https://hibernate.atlassian.net/browse/HHH-3887

Rafael Zeffa
  • 2,334
  • 22
  • 20
1

I wasn't sure if you mean't configure Envers auditing within the hbm files or just add Envers within the application.

  • If you need to configure within hbm, no is not possible as Rafael Zeffa previous answered. See this issue for reference
  • If you need to use Evers within a existing Application that has it's entities mapped with hbm.xml files, It's possible, you just need to add the Envers annotations as needed. I've created a sample application demonstrating this. You can download it here
André
  • 2,184
  • 1
  • 22
  • 30