From: Karl B. (JIRA) <no...@at...> - 2006-04-17 13:17:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=comments#action_22752 ] Karl Baum commented on HHH-1617: -------------------------------- I was looking into adding the logic for peeking into the cache within BatchFetchQueue.getEntityBatch and I ran into one problem. When fetching objects from the cache within DefaultLoadEventListener the LockMode is used to verify if we should be checking the cache versus doing a lookup in the database. final boolean useCache = persister.hasCache() && source.getCacheMode().isGetEnabled() && event.getLockMode().lessThan(LockMode.READ); My issue is I do not know where to get the LockMode for each EntityKey within BatchFetchQueue's batchLoadableEntityKeys. Am I missing something obvious? Thanks. -karl > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- 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 |