如何隔离Parse查询以使其不会影响其他查询?现在我的代码看起来像:
query.include("thing");
query.find({
success: function(results){
//there are results here as expected
}
})
query2.doesNotExist("something");
query2.find({
success: function(items){
//there are items here as expected
}
})
query.exists("key");
query.find({
success: function(keys){
//there are no results here but if I reverse the order of the queries . . .
}
})
现在,如果我以不同的顺序放置这些查询,我将最后一个查询放在上面,我得到了预期的结果。
query.exists("key");
query.find({
success: function(keys){
//there are no results here but if I reverse the order of the queries . . .
}
})
query.include("thing");
query.find({
success: function(results){
//there are results here as expected
}
})
query2.doesNotExist("something");
query2.find({
success: function(items){
//there are items here as expected
}
})
似乎两个Parse Queries用于查询'相互影响。我如何解决这个问题,以便每个查询都是独特的?
答案 0 :(得分:0)
经过进一步调查后,您似乎无法在Parse中继续查询。但是,您可以在同一个表/集合上创建新的Parse.Query。