大家好,我正在与我一起工作,我正在使用 parse.com PFQuery 或 QuerywithSubqueries
到目前为止,一切都运行良好,现在我需要添加第四个查询,但是当我运行时应用程序不断崩溃......有谁知道为什么会发生这种情况?
- (void) QueryForPost {
PFUser CurrentGoUser * = [ PFUser currentUser ] ;
PFQuery QueryForFriend * = [ PFQuery queryWithClassName : FF_AMICIZIE_CLASS ] ;
[ QueryForFriend whereKey : FF_AMICIZIE_A_USER equalTo : CurrentGoUser ] ;
[ QueryForFriend whereKey : FF_AMICIZIE_STATO equalTo : @ " Confirmed "];
[ QueryForFriend includeKey : FF_AMICIZIE_DA_USER ] ;
PFQuery QueryForPost * = [ PFQuery queryWithClassName : FF_POST_CLASS ] ;
[ QueryForPost whereKey : FF_POST_FLASH_POST_BOOLEANVALUE equalTo : [ NSNumber numberWithBool : YES] ] ;
[ QueryForPost whereKey : FF_POST_SCELTI equalTo : CurrentGoUser ] ;
PFQuery normalPostByFriends * = [ PFQuery queryWithClassName : FF_POST_CLASS ] ;
[ normalPostByFriends whereKey : FF_POST_FLASH_POST_BOOLEANVALUE equalTo : [ NSNumber numberWithBool : NO ]] ;
[ normalPostByFriends whereKey : FF_POST_UTENTE matchesKey : FF_AMICIZIE_DA_USER inquery : QueryForFriend ] ;
PFQuery normalPostByUser * = [ PFQuery queryWithClassName : FF_POST_CLASS ] ;
[ normalPostByUser whereKey : FF_POST_FLASH_POST_BOOLEANVALUE equalTo : [ NSNumber numberWithBool : NO ]] ;
[ normalPostByUser whereKey : FF_POST_UTENTE equalTo : CurrentGoUser ] ;
PFQuery queryForGoPointStatus * = [ PFQuery queryWithClassName : @ " goPoint "];
[ queryForGoPointStatus whereKey : @ " AssegnatoDa " equalTo : CurrentGoUser ] ;
PFQuery * query = [ PFQuery orQueryWithSubqueries : @ [ QueryForPost , normalPostByFriends , normalPostByUser , queryForGoPointStatus ]] ;
[ query includeKey : FF_POST_UTENTE ] ;
[ includeKey query : @ " AssegnatoDa "];
[ query OrderByDescending : FF_CREATEDAT ] ;
[ query findObjectsInBackgroundWithBlock : ^ ( NSArray * results, NSError * error ) {
if (! error) {
ArrayforPost = [ [ NSMutableArray alloc] init ] ;
for ( PFObject * object in results ) {
[ ArrayforPost addObject : object ] ;
}
[ self.FFTableView reloadData ] ;
Else { }
NSLog ( @ " Erroreeeee :% @" , error) ;
}
} ] ;
}