hibernat createSQLQuery use CacheQuery?

Posted by cometta on Stack Overflow See other posts from Stack Overflow or by cometta
Published on 2010-03-15T09:17:11Z Indexed on 2010/03/15 9:19 UTC
Read the original article Hit count: 127

Filed under:
|
|
Query query=getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(
                "select...

getHibernateTemplate().setCacheQueries(true);
List result= query.list();
getHibernateTemplate().setCacheQueries(false);

return result;

may i know when i do manual "createSQLQuery" how to use cacheQuery? the above doesnt cache the result. show_sql still showing every request get from database

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate