hibernate 4.3 Resolves a data problem that does not get the latest changes in the database by using get data because of a caching problem
problem processes and phenomena :
Query a data list = "Manually update data in database =" Refresh page, data display or old data before update
Find a solution online :
1, using session.clear (); empty the cache before querying----tested, this method is invalid in version 4.3, other versions are not tested;
Reference connection: https://www.linuxidc.com/Linux/2014-09/106458.htm
2, do not use hibernate default connection pool, use C3P0 connection pool, because need to replace the driver, replace the package, did not test this method;
Reference connection:
52950432
Https://www.2cto.com/database/201411/351800.html
3, in the query, also add transaction use---- tested this method is valid , guess that the transaction commit triggered a cached update
Reference connection:
http://www.iteye.com/problems/37351
https://bbs.csdn.net/topics/392168198
hibernate 4.3 resolves data issues that do not get the latest changes in the database using get data