Christian Plätzinger, I agree that HHH-11988 Closed is the source of the ClassCastException problem from 5.2.12. But unfortunately that only gets Envers to a state where it doesn't fault. The AuditReader query API still can return the entity that holds the collection in a way that the collection does not honor the @OrderBy ordering because the query generators used to populate the collection do not add the necessary ORDER BY SQL fragment. I should have the fix finished today as I've been testing a variety of combinations and making sure that the various RelationQueryGenerator implementations are backward compatible but also work properly with @OrderBy. |