MappingException when JOINED Inheritance and bidirectional references

Description

Given the following JPA model:

JPA model

Buchung.java

Buchung.java

Erzeugungsanlage.java

Portfoliowirkung.java

The initialization of EntityManagerFactory fails with the following exception: org.hibernate.MappingException: property [energiefluss] not found on entity [frol.Portfoliowirkung]

The full stack trace is:

Eclipselink (version 2.5.2) does not throw any exception.

See the attached test case.

No exception is thrown, if

  • entity Buch has SINGLE_TABLE inheritance.

  • entity Energiefluss has SINGLE_TABLE inheritance.

  • entities Buch and Energiefluss both have SINGLE_TABLE inheritance.

Environment

JPA, H2

Assignee

Unassigned

Reporter

Maxim Frolov

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure