【发布时间】:2015-07-19 21:05:59
【问题描述】:
我实现了上面的代码,是DBFlow教程中的代码
Update<Ant> update = new Update().table(Ant.class).set(Condition.column(Ant$Table.TYPE).eq("other"))
.where(Condition.column(Ant$Table.TYPE).is("worker"))
.and(Condition.column(Ant$Table.ISMALE).is(true));
update.queryClose();
Update() 和 queryClose() 变成红色。
事实上,在 DBFlow 的 Update 类中甚至没有出现我刚刚粘贴的代码中显示的方法 table()。
有人知道如何实现更新语句吗?谢谢
【问题讨论】:
-
嗨..我面临同样的问题..你找到解决方案了吗?
-
似乎 .table() 方法在最近的 DBFlow 版本中已被删除,现在模型类在构造函数中传递。 @Kayvan 的解决方案应该有效。
标签: android orm sql-update flow update-statement