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
}
})
看起來好像兩個「查詢」的分析查詢相互影響。我該如何解決這個問題,以便每個查詢都不同?