A @OneToMany relationship with a Map loads the data only on the first call

Description

A @OneToMany relationship with a Map loads the data only on the first call when specifying FetchType.LAZY;

The first call for the map returns the Map with data;

The second call returns an empty HashMap. The problem 'disappears' when i switch to FetchType.EAGER or when i save the HashMap at the call;

Environment

Hibernate 5.0.2.Final, on MySql (Google Cloud SQL)

Attachments

Assignee

Unassigned

Reporter

Roland Beuker

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