it appears to me, that envers does not find all the audited data when using an ElementCollection with a map. In the scenario described below, the data appears to be audited correctly in the database, but when trying to retrieve a revision, the map is always empty.
The problem is with the construction of the where predicates. the ThreeQueryGenerator assumes that both the map-key and map-value are derived from the same entity rather than the values being sourced from two different types.
The line in question here is this one:
It should have read B_AUD rather than C_AUD, therefore that is what is causing the query to return an empty map.
This predicate is specifically injected based on the call in ThreeEntityQueryGenerator at line 170.
Thanks for the quick review, so I will refrain from setting up a reproducer.
, yep there is no need. The nice thing is this highlighted a poor assumption made in a couple of related tests to this query generator and thus I'll be fixing those as well. Unfortunately in the meantime, there really isn't a way to work around without building from source if its critical.
It's ok that I do not have a work around as I am working on PoC so I can tell our customer that the issue will be addressed in the near future. I've been browsing the hibernate pages to find a time schedule but did not find one. Do you have a rough idea, when the next release will be available?
If you look at the HHH project's version list, we typically try to keep the release date of those unreleased versions updated but I know the next 5.2.x release has been delayed.