0
如何隔离解析查询以便不影响其他查询?现在我的代码如下所示:我如何使Parse 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
}
})
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
}
})
看起来好像两个“查询”的分析查询相互影响。我该如何解决这个问题,以便每个查询都不同?