Enhancement: Collection defined in @MappedSuperclass returns no result when loaded lazily

Description

When a collection is defined on a mappedsuperclass:

extended by

and

Accessing the collection lazily after getting the entity from database returns no results, but results when loaded eagerly. When the collection property is moved outside the @MappedSuperclass or without bytecode enhancement, everything works.

Test case: https://github.com/nikowitt/hibernate-test-case-templates/tree/HHH-12601-eager-lazy-mappedsuperclass-collection

Environment

None

Assignee

Unassigned

Reporter

Niko Wittenbeck

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure