[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4837) 2L-Querycache: NaturalKeyLookup throws EntityNotFoundException
Guenther Demetz (JIRA)
noreply at atlassian.com
Fri Feb 12 05:07:34 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35550#action_35550 ]
Guenther Demetz commented on HHH-4837:
--------------------------------------
The Bug is even worser than supposed:
NaturalKeyLookup query (Restrictions.naturalId() on immutable NaturalId )
continues to raise EntityNotFoundException even after a new entity with concerning
NaturalId was reinserted (and commited)!
This is definitely a BUG!
Please see attached Testcase TestLookupNaturalIdOnRecreatedEntity.jar
(find further needed resources TestLookupNaturalIdOnDeletedEntity.jar)
Workaround: evict manually the QueryCacheRegion each time after an entity with immutable NaturalId was deleted.
> 2L-Querycache: NaturalKeyLookup throws EntityNotFoundException
> --------------------------------------------------------------
>
> Key: HHH-4837
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4837
> Project: Hibernate Core
> Issue Type: Bug
> Components: caching (L2)
> Affects Versions: 3.5.0-Beta-3
> Environment: 3.5.0-Beta3, HSQLDB, Ehcache as 2L-cache provider
> Reporter: Guenther Demetz
> Attachments: TestLookupNaturalIdOnDeletedEntity.jar
>
>
> A cached NaturalKeyLookup query (immutable NaturalId) looking for a entity which has already been deleted,
> throws EntityNotFoundException.
> This is different to the behavior with disabled 2L-Querycache where the query simply returns null.
> Please see attached Testcase for details.
--
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