Hello, after updating Hibernate to 5.6.12 we get the following Exception in one of our test cases:
The test case is restoring an entity after it has been deleted using envers. For that we load the latest version of the entity with an audit query and save the result using a repository. Maybe this is not a very common use case, but it worked before. We only get this problem with Entities that have ElementCollections. For OneToMany collections the error does not occur - it looks like in that case, the envers proxy is somehow initialized during save before this code. I assume, the problem was introduced with the changes of https://hibernate.atlassian.net/browse/HHH-15522. Is it possible to add an instanceof check here or something like that? |