Hibernate Persistent Collections may be in an invalid state during entity hydration

Description

During hydration of an object that contains an @ElementCollection-annotated bean property, the provided collection is not in a valid state if the annotation specifies eager fetching (fetch = FetchType.EAGER). Any attempt to access the collection results in a org.hibernate.LazyInitializationException or org.hibernate.HibernateException.

This error behavior does not manifest for lazily-loaded @ElementCollections.

Environment

At least version 5.4.27 of Hibernate

Assignee

Unassigned

Reporter

Christopher Shain

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

Minor
Configure