Hello,
I've an interesting problem where the shared MySQL db server I am using uses MySQL query caching:
http://dev.mysql.com/doc/refman/5.1/en/query-cache.htmlSadly one particular section of my code involves reading a row from a table then updating it immediately afterwards. Hence invalidating the cache. Ideally I want to set SQL_NO_CACHE with in the SQL statement:
http://dev.mysql.com/doc/refman/5.1/en/ ... elect.htmlAlthough I'd prefer not to construct this from hand. Does anyone know if it is possible to specific in hibernate an option to include this for a particular load on hibernate template?
My code:
getHibernateTemplate().load(loginRecord, user.getId());
I have seen other information regarding the hibernate query cache, i.e. setCachable(true) etc, although we are not using any of these caches, we are using the query cache instead.
Any ideas? Or do i simply need to construct the statement in SQL and pass this to hibernate?
Cheers,
Mark.