How to disable hibernate caching

后端 未结 7 1159
梦谈多话
梦谈多话 2020-11-30 03:04

I am trying to write a unit test class which will have to use same query to fetch the results from database two times in same test method. But as Hibernate cache is enabled

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 03:39

    Use StatelessSession:

    http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/batch.html

提交回复
热议问题