session.clear does not clear StatefulPersistenceContext.naturalIdResolutionCacheMap

Description

According documentation session.clear clears the persistent context, so also StatefulPersistenceContext.naturalIdResolutionCacheMap should be cleared, otherwise we could run into memory retention problems.

Environment

None

Assignee

Strong Liu

Reporter

Guenther Demetz

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure