Empty left join fetched collection is uninitialized when collection key is composite with hibernate.create_empty_composites.enabled=true

Description

This bug is only relevant with hibernate.create_empty_composites.enabled=true and a collection key that is composite.

When doing a left join fetch with an empty collection, a null collection key is resolved as an empty composite. The collection element ends up being null (because there is no element), and is excluded from the collection. After the query is executed, the PersistentCollection remains uninitialized when it should be initialized as an empty collection.

Environment

None

Status

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Minor
Configure