ncthuc / hibernate-generic-dao

Automatically exported from code.google.com/p/hibernate-generic-dao
0 stars 0 forks source link

Issue when Implementing Ehcache #118

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
We are using GenericDAO in our project. Now we are implementing Hibernate 
Secondary Cache(EhCache) with the existing code.

Issue: Cannot fetch entity from Secondlevel cache. Because we have to set 
setCacheable(true) with each criteria query. We don't know how to set it with 
GenericDAO.
 Eg: 
Product product = (Product) 
session.createCriteria(Product.class).setCacheable(true)
                .add(Restrictions.eq("id", id))
                .uniqueResult();

How can I do with the same with google GenericDAO? Please help us.

Original issue reported on code.google.com by sonus...@gmail.com on 27 Jun 2015 at 10:31