{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/131","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/131/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/131/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/131","id":103787192,"number":131,"title":"Local Datastore losing information for PFObjects when app is killed","user":{"login":"barryllium","id":3670980,"avatar_url":"https://avatars.githubusercontent.com/u/3670980?v=3","gravatar_id":"","url":"https://api.github.com/users/barryllium","html_url":"https://github.com/barryllium","followers_url":"https://api.github.com/users/barryllium/followers","following_url":"https://api.github.com/users/barryllium/following{/other_user}","gists_url":"https://api.github.com/users/barryllium/gists{/gist_id}","starred_url":"https://api.github.com/users/barryllium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barryllium/subscriptions","organizations_url":"https://api.github.com/users/barryllium/orgs","repos_url":"https://api.github.com/users/barryllium/repos","events_url":"https://api.github.com/users/barryllium/events{/privacy}","received_events_url":"https://api.github.com/users/barryllium/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":4,"created_at":"2015-08-28T20:09:20Z","updated_at":"2015-09-11T02:20:37Z","closed_at":null,"body":"In an app I'm working on, I have a class named Group.  It subclasses PFObject, and has two variables: owner (which is a reference to the current user) and name, which is a String. I have Two scenarios, same code base - \r\n\r\nScenario 1:\r\n1. Log into app\r\n2. Put phone in airplane mode\r\n3. Create 4 groups with the following names: a, aa, aaa, aaaa\r\n4. Kill the app\r\n5. Open the app\r\n6. Go to groups page - only one group is listed, with name aaaa\r\n7. Take phone out of airplane mode\r\n8. Wait 10-15 seconds (long enough for phone to connect and have enough time to save to the server)\r\n9. Refresh group list, still only see group aaaa\r\n\r\n\r\nScenario 2:\r\n1. Log into app\r\n2. Put phone in airplane mode\r\n3. Create 4 groups with the following names: b, bb, bbb, bbbb\r\n4. Take phone out of airplane mode (we have not killed the app at this point, but it’s important to note that backgrounding/foregrounding the app has no effect or issue)\r\n5. Wait 10-15 seconds (long enough for phone to connect and have enough time to save to the server\r\n6. Refresh group list, see all four groups still exist\r\n\r\nWhen I look online at our Group table, I see eight rows.  Five of these rows have all the correct info - the rows for aaaa, b, bb, bbb, bbbb.  The other 3 rows (assumedly for the groups I named a, aa, and aaa) have info for objectId, createdAt, updatedAt, and ACL - but name and owner are both listed as undefined.  This leads me to believe that the local datastore is losing that info when the app is killed.  Here is my code that is giving the issue:\r\n\r\nGroup class:\r\n```\r\nclass Group: PFObject, PFSubclassing {\r\n    \r\n    static func parseClassName() -> String {\r\n        return \"Group\"\r\n    }\r\n    \r\n    @NSManaged var owner: TrustTreeUser // This class subclasses PFUser\r\n    @NSManaged var name: String\r\n    \r\n    func saveGroup() {\r\n        if IJReachability.isConnectedToNetwork() {\r\n            self.saveInBackground()\r\n        } else {\r\n            self.saveEventually()\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nCreating and saving the Group instance:\r\n```\r\nvar newGroup = Group()\r\nnewGroup.name = groupName // this is a string passed in from a UIAlertController\r\nnewGroup.owner = TrustTreeUser.currentUser()!\r\nnewGroup.saveGroup()\r\n```\r\n\r\nThis is is happening running iOS 8.4.1, Xcode 6.4, and has been experienced in Parse versions 1.8.0-1.8.2"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/comments/139431432","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/131#issuecomment-139431432","issue_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/131","id":139431432,"user":{"login":"gavinbunney","id":409207,"avatar_url":"https://avatars.githubusercontent.com/u/409207?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinbunney","html_url":"https://github.com/gavinbunney","followers_url":"https://api.github.com/users/gavinbunney/followers","following_url":"https://api.github.com/users/gavinbunney/following{/other_user}","gists_url":"https://api.github.com/users/gavinbunney/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinbunney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinbunney/subscriptions","organizations_url":"https://api.github.com/users/gavinbunney/orgs","repos_url":"https://api.github.com/users/gavinbunney/repos","events_url":"https://api.github.com/users/gavinbunney/events{/privacy}","received_events_url":"https://api.github.com/users/gavinbunney/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T02:20:37Z","updated_at":"2015-09-11T02:20:37Z","body":":+1: Seeing this issue as well - happens a lot when you have a device connected and relaunch (since it kills the app)"}}