Envers uses customs classes (ListProxy, SetProxy, etc) instead of PersistentCollection, so it is ignored by the "Hibernate.isInitialized" method. The Envers collection classes do not currently have any method to check if it is initialized or not. Proposed solution:
- Implement a LazyInitializable interface that PersistentCollection and Envers collections would extend, and which would only declare the method wasInitialized.
- Modifiy Hibernate.isInitialized method to check this Interface
|