{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/587","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/587/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/587/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/587","id":117988798,"number":587,"title":"saveInBackground/saveAsync not working with circular links","user":{"login":"batkov","id":582671,"avatar_url":"https://avatars.githubusercontent.com/u/582671?v=3","gravatar_id":"","url":"https://api.github.com/users/batkov","html_url":"https://github.com/batkov","followers_url":"https://api.github.com/users/batkov/followers","following_url":"https://api.github.com/users/batkov/following{/other_user}","gists_url":"https://api.github.com/users/batkov/gists{/gist_id}","starred_url":"https://api.github.com/users/batkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batkov/subscriptions","organizations_url":"https://api.github.com/users/batkov/orgs","repos_url":"https://api.github.com/users/batkov/repos","events_url":"https://api.github.com/users/batkov/events{/privacy}","received_events_url":"https://api.github.com/users/batkov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/labels/needs%20investigation","name":"needs investigation","color":"ffeea9"}],"state":"open","locked":false,"assignee":{"login":"nlutsenko","id":606991,"avatar_url":"https://avatars.githubusercontent.com/u/606991?v=3","gravatar_id":"","url":"https://api.github.com/users/nlutsenko","html_url":"https://github.com/nlutsenko","followers_url":"https://api.github.com/users/nlutsenko/followers","following_url":"https://api.github.com/users/nlutsenko/following{/other_user}","gists_url":"https://api.github.com/users/nlutsenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nlutsenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlutsenko/subscriptions","organizations_url":"https://api.github.com/users/nlutsenko/orgs","repos_url":"https://api.github.com/users/nlutsenko/repos","events_url":"https://api.github.com/users/nlutsenko/events{/privacy}","received_events_url":"https://api.github.com/users/nlutsenko/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-11-20T08:26:10Z","updated_at":"2015-12-03T04:30:34Z","closed_at":null,"body":"Hello,\r\n\r\nI've tried this on Parse iOS SDK 1.10.0 / 1.9.1 / 1.8.5 / 1.8.0\r\nAlso local storage enabled. I think this is the key issue.\r\n\r\nIf we have circular links object not being saved. \r\nFor example, we have following entities:\r\n```\r\nMessage (text (string), like (Like))\r\nLike (message (Message))\r\n```\r\n\r\nIf we will try for existing Message create like, set links, so saveInBackground will stuck. No call to server performed.\r\n\r\n```\r\n- (void) setLikeToMessage:(Message) msg {\r\n     Like * like = [Like object];\r\n     like.message = msg;\r\n     msg.like = like;\r\n     [msg saveInBackgroundWithBlock:(BOOL, NSError*) {\r\n            // Not called. Server call not performed\r\n     }];\r\n}\r\n```\r\nBut this code will work:\r\n```\r\n- (void) setLikeToMessage:(Message) msg {\r\n     Like * like = [Like object];\r\n     like.message = msg;\r\n     msg.like = like;\r\n     [like saveInBackgroundWithBlock:(BOOL, NSError*) {\r\n            // Called. Works properly\r\n     }];\r\n}\r\n```\r\n\r\nI did stop research on this issue, but then I found that I cannot sign up existing anonymous user.\r\nI have following entities:\r\n```\r\nUser (experience (Experience), personalProdile (PersonalProfile), ....another fields)\r\nExperience (user (User), another fields)\r\nPersonalProfile (user (User), another fields)\r\n```\r\n\r\nAnd for existing anonymous user Im' trying to do following:\r\n```\r\n+ (void)signUpWithUserName:(NSString *)userName \r\npassword:(NSString *)password \r\nemail:(NSString *)email\r\ncompletion:(void(^)(NSError *error))completion {\r\n    User *user = [User currentUser];\r\n   // I did try to make [User objectWithoutDataWithObjectId:] but local data store get's data from DB.\r\n    user.username = userName;\r\n    user.password = password;\r\n    user.email = email;\r\n    \r\n    [user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {\r\n        // Not called. Server call not performed\r\n        if (completion) {\r\n            completion(error);\r\n        }\r\n    }];\r\n}\r\n```\r\n\r\nAnd it stuck for ever. I did debug and found that it goes to method called\r\n```\r\n+ (BFTask *)_deepSaveAsync:(id)object withCurrentUser:(PFUser *)currentUser sessionToken:(NSString *)sessionToken\r\n```\r\nAnd so **BFTask** created in this method never being called.\r\n\r\nPlease advise"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/comments/161511575","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/587#issuecomment-161511575","issue_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/587","id":161511575,"user":{"login":"nlutsenko","id":606991,"avatar_url":"https://avatars.githubusercontent.com/u/606991?v=3","gravatar_id":"","url":"https://api.github.com/users/nlutsenko","html_url":"https://github.com/nlutsenko","followers_url":"https://api.github.com/users/nlutsenko/followers","following_url":"https://api.github.com/users/nlutsenko/following{/other_user}","gists_url":"https://api.github.com/users/nlutsenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nlutsenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlutsenko/subscriptions","organizations_url":"https://api.github.com/users/nlutsenko/orgs","repos_url":"https://api.github.com/users/nlutsenko/repos","events_url":"https://api.github.com/users/nlutsenko/events{/privacy}","received_events_url":"https://api.github.com/users/nlutsenko/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T04:30:34Z","updated_at":"2015-12-03T04:30:34Z","body":"Hey @batkov, I've just attached a pull request to this issue that fixes the problem.\r\nSince you are using CocoaPods - you can test it yourself by using this in your Podfile:\r\n```ruby\r\npod 'Parse', :git => 'git@github.com:ParsePlatform/Parse-SDK-iOS-OSX.git', :branch => 'nlutsenko.user.save'\r\n```\r\n\r\n\r\nLet me know how it goes, but I've tested using your project and it signs the user up right now without hanging."}}