你如何更新Ormlite外国场? [英] How do you update a foreign field in Ormlite?

查看:228
本文介绍了你如何更新Ormlite外国场?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过更新(对象)更新(preparedUpdate) executeRaw(字符串) updateRaw(字符串),甚至直接使用辅助类,然后使用试过的getData(查询字符串)。但我的表的外场依然没有更新。任何思考为什么发生这种情况?

I tried update(Object), update(PreparedUpdate), executeRaw(String), updateRaw(String), and even tried directly using the helper class then using getData(String query). But my table's foreign field is still not updated. Any thoughts why this is happening?

推荐答案

我发现我使用的方法更新(对象)其他方法,而通过一个过时实例对象,我尝试更新。所以一旦我用实际的更新(preparedUpdate)方法,我恢复的对象恢复到原来的状态,一些其他的方法是使用更新(过时对象)

I found out that I am using the method update(Object) on other methods while passing an outdated instance of the object I am trying to update. So once I use the actual update(PreparedUpdate) method, I am reverting the object back to its original state as some other method is using update(outdated Object)

这篇关于你如何更新Ormlite外国场?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆