我有PFUser
几个PFRelation
指向其他对象的对象。当我运行以下代码时:
PFRelation *relation = [[PFUser currentUser] relationForKey:@"Relation"];
PFQuery *query = [relation query];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){
NSLog(@"%@", objects);
}];
它工作正常。但是,当我想从本地数据存储中执行相同操作时:
PFRelation *relation = [[PFUser currentUser] relationForKey:@"Relation"];
PFQuery *query = [[relation query] fromLocalDataStore]; // !!!
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){
NSLog(@"%@", objects);
}];
尽管我已经将我的用户和相关对象都固定在[myObject pinInBackground]
.
为什么PFRelation
查询不支持fromLocalDataStore
?我做错了什么?