skip up-to-date checks of query cache for natural-id only if immutable

Description

Currently we skip the up-to-date checks for query cache entries when the query is a natural-id lookup. The reason being to avoid the database hit due to the (potential) invalidation caused by changes to the entity. However, that is not correct behavior if the mutable natural key itself changed. This skipping should be limited to the case of immutable natural ids.

Environment

None

Activity

Show:
Chris Bredesen
October 16, 2007, 8:14 PM

We should also clearly define the role of a natural ID. For example, can an entity identified by a natural ID be deleted and re-created with the same natural ID (but a different PK) – in the same transaction? The same Session? Ever?

Chris Bredesen
October 16, 2007, 8:17 PM

That last comment was of course referring to the role of an IMMUTABLE natural ID. I.e., how "mutable" is it with regard to deletion and re-creation.

Steve Ebersole
October 16, 2007, 11:05 PM

trunk / 3.2

Assignee

Steve Ebersole

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major
Configure