AVObject *todo= [AVObject objectWithClassName:@"Todo"];
NSMutableArray *tempArr = [NSMutableArray array];
for (int i = 0; i < 5; i++) {
AVObject *comment = [AVObject objectWithClassName:@"Comment"];
[tempArr addObject:comment];
}
[todo setObject:@"zs" forKey:@"name"];
[todo setObject:tempArr forKey:@"commentArr"];
[todo saveInBackground];
oc的代码,本意是AVObject下有个数组,数组里面又是AVObject对象。不是太懂,代码上看起来没问题,但是没法保存成功。报错提示Malformed pointer. Pointers must be maps of a classname and an object id.