| I personally think there may be some value in exposing a run-time model that users can inspect. The only concern I have presently is that EntityConfiguration is mutable and I'd ideally prefer this run-time model that we expose to be immutable. There is a fair bit of internal changes that are planned throughout the 6.x release stream, so adding this as a part of that rework should be quite easy. If I had to suggest either of your workarounds, it would be the one based on the JPA metamodel. It will remain portable across both major versions and adheres to a public API without accessing any internals of either ORM or Envers. I can tell you that the reflection approach using EnversServiceImpl will not be portable to 6.x at all. |