Envers, @OneToMany.mappedBy and @OrderColumn

Description

A problem occurrs with the following mapping:

It seems that in this case Envers ignores OrderColumn annotation and creates document_AUD table without index column:

If we add index column manually it will always stay empty.

And then if we try to access documents in Project revision it fails with NPE:

I think it's defenitely a bug.

What are possible work-arounds?

I attached a simple project with hsqldb that reproduces this bug.

Environment

Postgresql 9.3, hsqldb 2.3.2

Assignee

Unassigned

Reporter

Andrey Yakovlev

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure