{"action":"created","comment":{"url":"https://api.github.com/repos/launchdarkly/ios-client/pulls/comments/44615149","id":44615149,"diff_hunk":"@@ -228,8 +234,33 @@ -(User *)build\n         [user setAnonymous:currentAnonymous];\n     }\n     DEBUG_LOG(@\"LDUserBuilder building User with anonymous: %d\", anonymous);\n-    [[DataManager sharedManager] saveContext];\n+    [self saveUser: user];\n     return user;\n }\n \n+-(void) saveUser: (User *) user {\n+    UserEntity *userEntity = [[DataManager sharedManager] findUserEntityWithkey:key];\n+    \n+    if(!userEntity) {\n+        [MTLManagedObjectAdapter managedObjectFromModel: user","path":"Darkly/LDUserBuilder.m","position":55,"original_position":55,"commit_id":"9eb9f2817020343a95386357a397fcc67ccc8309","original_commit_id":"9eb9f2817020343a95386357a397fcc67ccc8309","user":{"login":"cmavromoustakos","id":111412,"avatar_url":"https://avatars.githubusercontent.com/u/111412?v=3","gravatar_id":"","url":"https://api.github.com/users/cmavromoustakos","html_url":"https://github.com/cmavromoustakos","followers_url":"https://api.github.com/users/cmavromoustakos/followers","following_url":"https://api.github.com/users/cmavromoustakos/following{/other_user}","gists_url":"https://api.github.com/users/cmavromoustakos/gists{/gist_id}","starred_url":"https://api.github.com/users/cmavromoustakos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmavromoustakos/subscriptions","organizations_url":"https://api.github.com/users/cmavromoustakos/orgs","repos_url":"https://api.github.com/users/cmavromoustakos/repos","events_url":"https://api.github.com/users/cmavromoustakos/events{/privacy}","received_events_url":"https://api.github.com/users/cmavromoustakos/received_events","type":"User","site_admin":false},"body":"@jeff-byrnesinnovation  I do it in Darkly/LDUserBuilder.m:260","created_at":"2015-11-12T02:22:16Z","updated_at":"2015-11-12T02:22:16Z","html_url":"https://github.com/launchdarkly/ios-client/pull/10#discussion_r44615149","pull_request_url":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/launchdarkly/ios-client/pulls/comments/44615149"},"html":{"href":"https://github.com/launchdarkly/ios-client/pull/10#discussion_r44615149"},"pull_request":{"href":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10","id":49394196,"html_url":"https://github.com/launchdarkly/ios-client/pull/10","diff_url":"https://github.com/launchdarkly/ios-client/pull/10.diff","patch_url":"https://github.com/launchdarkly/ios-client/pull/10.patch","issue_url":"https://api.github.com/repos/launchdarkly/ios-client/issues/10","number":10,"state":"open","locked":false,"title":"Removed obsolete temp context as we are performing all context","user":{"login":"gus-byrnesinnovation","id":13595850,"avatar_url":"https://avatars.githubusercontent.com/u/13595850?v=3","gravatar_id":"","url":"https://api.github.com/users/gus-byrnesinnovation","html_url":"https://github.com/gus-byrnesinnovation","followers_url":"https://api.github.com/users/gus-byrnesinnovation/followers","following_url":"https://api.github.com/users/gus-byrnesinnovation/following{/other_user}","gists_url":"https://api.github.com/users/gus-byrnesinnovation/gists{/gist_id}","starred_url":"https://api.github.com/users/gus-byrnesinnovation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gus-byrnesinnovation/subscriptions","organizations_url":"https://api.github.com/users/gus-byrnesinnovation/orgs","repos_url":"https://api.github.com/users/gus-byrnesinnovation/repos","events_url":"https://api.github.com/users/gus-byrnesinnovation/events{/privacy}","received_events_url":"https://api.github.com/users/gus-byrnesinnovation/received_events","type":"User","site_admin":false},"body":"operations using the block syntax they will be executed in the default\r\ncontext queue set up for this ManagedObjectContext\r\n\r\nAdded code to store and read the config from the db. The db will be\r\nupdated and is retreived each time by overriding the User#config method\r\nto return the first config found on the store.","created_at":"2015-11-02T04:32:58Z","updated_at":"2015-11-12T02:22:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee7d1b404b003901baad7d00775a013e5c5b5fc1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10/commits","review_comments_url":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10/comments","review_comment_url":"https://api.github.com/repos/launchdarkly/ios-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/launchdarkly/ios-client/issues/10/comments","statuses_url":"https://api.github.com/repos/launchdarkly/ios-client/statuses/9eb9f2817020343a95386357a397fcc67ccc8309","head":{"label":"launchdarkly:cm-persist-config","ref":"cm-persist-config","sha":"9eb9f2817020343a95386357a397fcc67ccc8309","user":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"repo":{"id":45078705,"name":"ios-client","full_name":"launchdarkly/ios-client","owner":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/launchdarkly/ios-client","description":"LaunchDarkly SDK for iOS","fork":false,"url":"https://api.github.com/repos/launchdarkly/ios-client","forks_url":"https://api.github.com/repos/launchdarkly/ios-client/forks","keys_url":"https://api.github.com/repos/launchdarkly/ios-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/launchdarkly/ios-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/launchdarkly/ios-client/teams","hooks_url":"https://api.github.com/repos/launchdarkly/ios-client/hooks","issue_events_url":"https://api.github.com/repos/launchdarkly/ios-client/issues/events{/number}","events_url":"https://api.github.com/repos/launchdarkly/ios-client/events","assignees_url":"https://api.github.com/repos/launchdarkly/ios-client/assignees{/user}","branches_url":"https://api.github.com/repos/launchdarkly/ios-client/branches{/branch}","tags_url":"https://api.github.com/repos/launchdarkly/ios-client/tags","blobs_url":"https://api.github.com/repos/launchdarkly/ios-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/launchdarkly/ios-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/launchdarkly/ios-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/launchdarkly/ios-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/launchdarkly/ios-client/statuses/{sha}","languages_url":"https://api.github.com/repos/launchdarkly/ios-client/languages","stargazers_url":"https://api.github.com/repos/launchdarkly/ios-client/stargazers","contributors_url":"https://api.github.com/repos/launchdarkly/ios-client/contributors","subscribers_url":"https://api.github.com/repos/launchdarkly/ios-client/subscribers","subscription_url":"https://api.github.com/repos/launchdarkly/ios-client/subscription","commits_url":"https://api.github.com/repos/launchdarkly/ios-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/launchdarkly/ios-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/launchdarkly/ios-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/launchdarkly/ios-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/launchdarkly/ios-client/contents/{+path}","compare_url":"https://api.github.com/repos/launchdarkly/ios-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/launchdarkly/ios-client/merges","archive_url":"https://api.github.com/repos/launchdarkly/ios-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/launchdarkly/ios-client/downloads","issues_url":"https://api.github.com/repos/launchdarkly/ios-client/issues{/number}","pulls_url":"https://api.github.com/repos/launchdarkly/ios-client/pulls{/number}","milestones_url":"https://api.github.com/repos/launchdarkly/ios-client/milestones{/number}","notifications_url":"https://api.github.com/repos/launchdarkly/ios-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/launchdarkly/ios-client/labels{/name}","releases_url":"https://api.github.com/repos/launchdarkly/ios-client/releases{/id}","created_at":"2015-10-28T00:32:16Z","updated_at":"2015-10-28T00:43:25Z","pushed_at":"2015-11-11T05:53:57Z","git_url":"git://github.com/launchdarkly/ios-client.git","ssh_url":"git@github.com:launchdarkly/ios-client.git","clone_url":"https://github.com/launchdarkly/ios-client.git","svn_url":"https://github.com/launchdarkly/ios-client","homepage":null,"size":343,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"launchdarkly:master","ref":"master","sha":"d522f8bc9ebd84ebbef6ab7cfe0ba2f5558da97d","user":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"repo":{"id":45078705,"name":"ios-client","full_name":"launchdarkly/ios-client","owner":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/launchdarkly/ios-client","description":"LaunchDarkly SDK for iOS","fork":false,"url":"https://api.github.com/repos/launchdarkly/ios-client","forks_url":"https://api.github.com/repos/launchdarkly/ios-client/forks","keys_url":"https://api.github.com/repos/launchdarkly/ios-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/launchdarkly/ios-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/launchdarkly/ios-client/teams","hooks_url":"https://api.github.com/repos/launchdarkly/ios-client/hooks","issue_events_url":"https://api.github.com/repos/launchdarkly/ios-client/issues/events{/number}","events_url":"https://api.github.com/repos/launchdarkly/ios-client/events","assignees_url":"https://api.github.com/repos/launchdarkly/ios-client/assignees{/user}","branches_url":"https://api.github.com/repos/launchdarkly/ios-client/branches{/branch}","tags_url":"https://api.github.com/repos/launchdarkly/ios-client/tags","blobs_url":"https://api.github.com/repos/launchdarkly/ios-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/launchdarkly/ios-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/launchdarkly/ios-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/launchdarkly/ios-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/launchdarkly/ios-client/statuses/{sha}","languages_url":"https://api.github.com/repos/launchdarkly/ios-client/languages","stargazers_url":"https://api.github.com/repos/launchdarkly/ios-client/stargazers","contributors_url":"https://api.github.com/repos/launchdarkly/ios-client/contributors","subscribers_url":"https://api.github.com/repos/launchdarkly/ios-client/subscribers","subscription_url":"https://api.github.com/repos/launchdarkly/ios-client/subscription","commits_url":"https://api.github.com/repos/launchdarkly/ios-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/launchdarkly/ios-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/launchdarkly/ios-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/launchdarkly/ios-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/launchdarkly/ios-client/contents/{+path}","compare_url":"https://api.github.com/repos/launchdarkly/ios-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/launchdarkly/ios-client/merges","archive_url":"https://api.github.com/repos/launchdarkly/ios-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/launchdarkly/ios-client/downloads","issues_url":"https://api.github.com/repos/launchdarkly/ios-client/issues{/number}","pulls_url":"https://api.github.com/repos/launchdarkly/ios-client/pulls{/number}","milestones_url":"https://api.github.com/repos/launchdarkly/ios-client/milestones{/number}","notifications_url":"https://api.github.com/repos/launchdarkly/ios-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/launchdarkly/ios-client/labels{/name}","releases_url":"https://api.github.com/repos/launchdarkly/ios-client/releases{/id}","created_at":"2015-10-28T00:32:16Z","updated_at":"2015-10-28T00:43:25Z","pushed_at":"2015-11-11T05:53:57Z","git_url":"git://github.com/launchdarkly/ios-client.git","ssh_url":"git@github.com:launchdarkly/ios-client.git","clone_url":"https://github.com/launchdarkly/ios-client.git","svn_url":"https://github.com/launchdarkly/ios-client","homepage":null,"size":343,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10"},"html":{"href":"https://github.com/launchdarkly/ios-client/pull/10"},"issue":{"href":"https://api.github.com/repos/launchdarkly/ios-client/issues/10"},"comments":{"href":"https://api.github.com/repos/launchdarkly/ios-client/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/launchdarkly/ios-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/launchdarkly/ios-client/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/launchdarkly/ios-client/statuses/9eb9f2817020343a95386357a397fcc67ccc8309"}}}}