[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3522) Null value cannot be cache using hibernate
nikita tovstoles (JIRA)
noreply at atlassian.com
Tue Jan 6 19:57:39 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32056#action_32056 ]
nikita tovstoles commented on HHH-3522:
---------------------------------------
Clarification question on 'Rejected' resolution:
Is caching null values not possible at all, or is possible but not with EhCache as cache provider?
Ehcache does cache null values but does not distinguish between null and miss when returning a get(). Seems like
* Hibernate's ReadWriteCache could check whether given key's contained in cache if cache.get() returns null OR
* CacheEntryStructure.structure could be changed to handle nulls
> Null value cannot be cache using hibernate
> --------------------------------------------
>
> Key: HHH-3522
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3522
> Project: Hibernate Core
> Issue Type: Bug
> Components: caching (L2)
> Environment: Hibernate 3.3.1, Ehcache 1.5, Java1.5
> Reporter: Lao Shing Kit
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> I'm using Hibernate with 2nd level cache using Ehcache. We found that if the result returned using session.get() (searching by primary key) is NULL, the value will not be cached in 1st level and 2nd level cache and SQL will be fired to database. There is no problem if the value retuurned is not null for the same entity. I have debug using the hibernate and ehcache source and I'm sure that the cache is enabled and called properly. Actually the null value is expected to be cached also. I have browser all hibernate and ehcache documentation and forum and no related config is available. So, is it a bug?
> Thanks all for your help!
--
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