AVUser *user = [AVUser user] ;
AVObject *userInfo = [AVObject objectWithClassName:@"userInfo"] ;
[user setObject:userInfo forKey:@"userInfo"] ;
[user signUpInBackground] ;
这样的代码不会在_user中自动添加userInfo[POINTER类型]字段。而官方文档中这样的写法能有parent[POINTER类型]
AVObject *myPost = [AVObject objectWithClassName:@"Post"];
AVObject *myComment = [AVObject objectWithClassName:@"Comment"];
// Add a one-one relation between the Post and Comment
[myComment setObject:myPost forKey:@"parent"];
// This will save both myPost and myComment
[myComment saveInBackground];
上面是signUpInBackground,这是注册接口,下面是saveInBackground,这个才是保存数据的接口