简体   繁体   English

从数据库中获取旧值,即使在更新之后?

[英]Getting old values from database, even after update?

I am using MySQL as DB, and Toplink essential as persistence layer. 我将MySQL用作数据库,并将Toplink用作持久层。

There is a column, that I used to update regularly. 我曾经定期更新一列。 But am always getting the value the value that was there at instance of START of the server. 但是我总是在服务器的START实例中获得该值。

But I restart the server, then only, its giving me the updated value. 但是我仅重启服务器,它为我提供了更新的值。

What could be the problem? 可能是什么问题呢?

I was able to fix the problem by updating Persistence.xml , which allowed to disable any kind of Caching done by toplink. 我能够通过更新Persistence.xml来解决此问题,该文件允许禁用toplink完成的任何类型的缓存。

<properties>
    <property name="toplink.cache.shared.default" value="false"/>
</properties>

Refered Link http://docs.oracle.com/cd/B31017_01/web.1013/b28221/cfgdepds005.htm#TopLinkCaching 引用链接http://docs.oracle.com/cd/B31017_01/web.1013/b28221/cfgdepds005005.htm#TopLinkCaching

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在获取数据库中的值后,在codeigniter 3中获取未定义的索引返回日期? - getting an undefined index return date in codeigniter 3 even after getting values from database? 即使在更新之后,MYSQL查询也可以获取旧记录 - MYSQL query to get the old records even after the update 从数据库中获取值后,Symfony4 更新功能不起作用 - In Symfony4 update function not working,after values fetch from database 如何更新数据库记录并仍然保留MySQL中的旧值? - How to update a database record and still keep the old values in MySQL? 如何使用laravel更新数据库记录并仍然保留旧值? - How to update a database record and still keep the old values using laravel? Joomla数据库查询更新后返回旧值 - Joomla database query returns old value after update Java JDBC在删除和插入新行后获取旧值 - Java JDBC getting old values after deleting and inserting new rows 如数组中那样从数据库获取值 - Getting values from database as in Array 从数据库中的列获取值 - getting values from column in database PHP PDO MYSQL- 使用 implode() 更新列中具有多个值的单元格,使用旧值获取新值 - PHP PDO MYSQL- update a cell in column has multiple values using implode(), getting new with old values
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM