NaturalIdLoadAccess not properly working on mutable NaturalId's

Description

After updating the value of a mutable NaturalId, the entity object can be retrieved with the new value, but also with the old value.

assertNotSame(session.bySimpleNaturalId(C.class).load("1"), session.bySimpleNaturalId(C.class).load("3")); --> failing

See attached testcase:
On deletions the internal NaturalId cache is synchronized properly (testDeleteNaturalId) but not on modifications (testModifieableNaturalId)

Environment

Hibernate4.1.0, db independent (HSQLDB used in attached testcase)

Assignee

Unassigned

Reporter

Guenther Demetz

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure