[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2892) skip up-to-date checks of query cache for natural-id only if immutable

Chris Bredesen (JIRA) noreply at atlassian.com
Tue Oct 16 14:14:38 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28438 ] 

Chris Bredesen commented on HHH-2892:
-------------------------------------

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?

> skip up-to-date checks of query cache for natural-id only if immutable
> ----------------------------------------------------------------------
>
>                 Key: HHH-2892
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2892
>             Project: Hibernate3
>          Issue Type: Bug
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.2.6, 3.3
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list