【问题标题】:Pointers data not storing in local database parse ios指针数据未存储在本地数据库解析 ios
【发布时间】:2015-02-19 02:53:57
【问题描述】:

我有一个查询,其中包含许多指向另一个类的指针。从解析云接收数据后,所有记录都使用 pinAll 方法存储在本地。当我取回存储的结果时,我可以获取记录但不包括指针。请参阅下面的示例代码

[query includeKey:@"classOne.innerClass"];
[query includeKey:@"classTwo.innerClass"];
[query includeKey:@"classThree"];
[query includeKey:@"classFour"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){
   [PFObject pinAllInBackground:objects withName:@"LocalRecords" block:^(BOOL succeeded, NSError *error) {

   }];
}];

我正在获取类似

的记录
PFQuery *lquery = [PFQuery queryWithClassName:[ClassName parseClassName]];
   [lquery fromPinWithName:@"LocalRecords"];
   BFTask *btask = [[lquery findObjectsInBackground] continueWithSuccessBlock:^id(BFTask *task) {
        if (task.error) {
            NSLog(@"Error: %@", task.error);
            return task;
        }
   }];

当我尝试访问 classOne、classTwo、classThree 和 classFour 中的任何列时,我收到异常在获取其值之前调用 fetchIfNeeded。'

【问题讨论】:

  • 在你可以从本地数据库中获取之前,你必须告诉查询它需要在哪里查看[query fromLocalDatastore];
  • 我已经在使用这个.....不走运
  • 我也有兴趣了解有关此问题的更多信息。您针对哪个版本的 iOS SDK 进行了测试?
  • 你和stackoverflow.com/a/27586395/590767的距离是多少?
  • @fatuhoku 我正在使用最新的环境。 xcode 6 与 iOS8。

标签: ios debugging parse-platform sdk local-datastore


【解决方案1】:

这是 iOS 的 Parse.com 本地数据存储功能中的一个错误。

来自 1.6.3 发行说明:

“使用 includeKey: 和 NSNull 值改进了本地数据存储/解析查询的一致性。”

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-26
    • 1970-01-01
    • 2019-03-26
    • 2015-04-14
    • 2015-12-17
    相关资源
    最近更新 更多