ClassCastException for an audited ordered collection

Description

After updating Hibernate and Envers from version 4.3.11 to 5.3.6 the application fails to start due to a ClassCastException: org.hibernate.mapping.Bag cannot be cast to org.hibernate.mapping.IndexedCollection

After some debugging I found out that this happens on an entity with a @OneToMany collection which is ordered using @OrderBy.

Environment

None

Status

Assignee

Chris Cranford

Reporter

Christian Pl├Ątzinger

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

4.3.11
5.2.11

Components

Affects versions

Priority

Major
Configure