Migrating from Hibernate /Envers 4.3.8 to 5.4.14 one thing breaks consistently is
reading an envers revision of my entity at specific revision where the entity has @OneToMany (bidirectional with mappedBy) with @OrderBy under any of the two conditions:
1. @OrderBy includes a ID of the "many" entity
2. @OrderBy includes a field of many entity which is itself a relation (@ManyToOne) it does not seem to matter if that field points to an audited entity or has targetAuditMode = RelationTargetAuditMode.NOT_AUDITED
Doing removing @OrderBy from @OneToMany or using any regular field (not matching conditions mentioned above) of the "many" entity works fine it just its ID and ManyToOne relationship fields that fail
*Engagement *entity has
I also face this very critical issue, as occurring on a quite regular use-case (@OneToMany with @OrderBy).
It seems I can’t vote for the issue, but looking forward for any help/resolution .