I am using hibernate 4.x and want to set the "SQL_NO_CACHE" statement from MySQL inside a HQL query
@Query("FROM mytable t WHERE id=1");
currently produces
select * from mytable where id=1
but I want
select SQL_NO_CACHE * from mytable where id=1
but I cannot figure out how.
No problem using a native query, but all query are written in HQL and are much more complex than this example. So I am getting a QuerySyntaxException: unexpected token
Exception, since this statement is not documented anyhow in the hibernate documentation.
http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch16.html