{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/898","repository_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/898/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/898/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/898/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/898","id":148290076,"number":898,"title":"getObjectInBackgroundWithId with nil ObjectId returns an object","user":{"login":"rmaqueda","id":2968375,"avatar_url":"https://avatars.githubusercontent.com/u/2968375?v=3","gravatar_id":"","url":"https://api.github.com/users/rmaqueda","html_url":"https://github.com/rmaqueda","followers_url":"https://api.github.com/users/rmaqueda/followers","following_url":"https://api.github.com/users/rmaqueda/following{/other_user}","gists_url":"https://api.github.com/users/rmaqueda/gists{/gist_id}","starred_url":"https://api.github.com/users/rmaqueda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmaqueda/subscriptions","organizations_url":"https://api.github.com/users/rmaqueda/orgs","repos_url":"https://api.github.com/users/rmaqueda/repos","events_url":"https://api.github.com/users/rmaqueda/events{/privacy}","received_events_url":"https://api.github.com/users/rmaqueda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/labels/needs%20more%20info","name":"needs more info","color":"ffd182"}],"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":3,"created_at":"2016-04-14T08:31:35Z","updated_at":"2016-04-21T23:41:11Z","closed_at":null,"body":"SDK Versión: 1.13.0\r\n\r\nHi all,\r\n\r\nI think I found a mistake in method getObjectInBackgroundWithId. Its behaviour is strange when I send a nil value on ObjectId to this query: it returns the last object from the table!\r\nThis behaviour is different with bolts call: returns nil (I think that it's the correct response).\r\n\r\nExample:\r\n\r\n```\r\nPFQuery *query = [MOLDocument query];\r\nquery.cachePolicy = kPFCachePolicyCacheThenNetwork;\r\n[query getObjectInBackgroundWithId:nil block:^(PFObject * _Nullable object, NSError * _Nullable error) {\r\n   NSLog(@\"The return objectId: %@\", object.objectId);\r\n}];\r\n\r\n\r\n\r\nThe return objectId: WiAXFAWrJM\r\n```\r\n\r\nExample with bolts:\r\n```\r\nPFQuery *query = [MOLDocument query];\r\n[[query getObjectInBackgroundWithId:nil] continueWithBlock:^id _Nullable(BFTask * _Nonnull task) {\r\n   PFObject *object = task.result;\r\n   NSLog(@\"The return objectId: %@\", object.objectId);\r\n   return task;\r\n}];\r\n\r\n\r\n\r\nThe return objectId: (null)\r\n```\r\n\r\n¿What do you think? Thanks!!"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/comments/213161228","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/898#issuecomment-213161228","issue_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/898","id":213161228,"user":{"login":"parse-github-bot","id":13906986,"avatar_url":"https://avatars.githubusercontent.com/u/13906986?v=3","gravatar_id":"","url":"https://api.github.com/users/parse-github-bot","html_url":"https://github.com/parse-github-bot","followers_url":"https://api.github.com/users/parse-github-bot/followers","following_url":"https://api.github.com/users/parse-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/parse-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/parse-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parse-github-bot/subscriptions","organizations_url":"https://api.github.com/users/parse-github-bot/orgs","repos_url":"https://api.github.com/users/parse-github-bot/repos","events_url":"https://api.github.com/users/parse-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/parse-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T23:41:11Z","updated_at":"2016-04-21T23:41:11Z","body":"This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback."}}