{"action":"created","issue":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/1442","repository_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/1442/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/1442/comments","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/1442/events","html_url":"https://github.com/couchbase/couchbase-lite-ios/issues/1442","id":177216998,"number":1442,"title":"Collection class properties not propagating from CBLDocument to CBLModel after sync","user":{"login":"brendand","id":586075,"avatar_url":"https://avatars.githubusercontent.com/u/586075?v=3","gravatar_id":"","url":"https://api.github.com/users/brendand","html_url":"https://github.com/brendand","followers_url":"https://api.github.com/users/brendand/followers","following_url":"https://api.github.com/users/brendand/following{/other_user}","gists_url":"https://api.github.com/users/brendand/gists{/gist_id}","starred_url":"https://api.github.com/users/brendand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendand/subscriptions","organizations_url":"https://api.github.com/users/brendand/orgs","repos_url":"https://api.github.com/users/brendand/repos","events_url":"https://api.github.com/users/brendand/events{/privacy}","received_events_url":"https://api.github.com/users/brendand/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/labels/f:%20Model","name":"f: Model","color":"d4c5f9"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/labels/P1:%20high","name":"P1: high","color":"e11d21"},{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/labels/testneeded","name":"testneeded","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"snej","id":43241,"avatar_url":"https://avatars.githubusercontent.com/u/43241?v=3","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"assignees":[{"login":"snej","id":43241,"avatar_url":"https://avatars.githubusercontent.com/u/43241?v=3","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/milestones/18","html_url":"https://github.com/couchbase/couchbase-lite-ios/milestones/1.4","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/milestones/18/labels","id":1790899,"number":18,"title":"1.4","description":"Bigger than 1.3, but less than 2.0.\r\nDue date is a placeholder only.","creator":{"login":"snej","id":43241,"avatar_url":"https://avatars.githubusercontent.com/u/43241?v=3","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":8,"state":"open","created_at":"2016-05-26T21:21:21Z","updated_at":"2016-09-15T20:01:54Z","due_on":"2016-12-30T00:00:00Z","closed_at":null},"comments":6,"created_at":"2016-09-15T15:58:34Z","updated_at":"2016-09-15T20:23:52Z","closed_at":"2016-09-15T18:48:34Z","body":"I'm debugging a sync issue and I'm seeing a situation where the CBLDocument has been correctly updated after a sync on my iPhone from a change I made on my Mac, but the associated property on the CBLModel subclass has not updated from the sync.\r\n\r\nThis appears to be related to the values within a collection class (in this case an NSDictionary) not updating in the CBLModel after a sync.\r\n\r\nHere's what a fragment of my CBLDocument looks like on my iPhone after my iPhone pulls the changes from the Mac:\r\n\r\n```\r\n(lldb) po [self.formEntry.document properties]\r\n{\r\n    values =     {\r\n        \"fld-0323bba4bfa54faa924da9128e298264\" = \"There we are again stuff\";\r\n        \"fld-0c1953513df54c07ae9b30ba3c44f93e\" = 1;\r\n```\r\n\r\nAnd here's what my CBLModel looks like for the same values property on the iPhone:\r\n\r\n```\r\n(lldb) po [self.formEntry values]\r\n{\r\n    \"fld-0323bba4bfa54faa924da9128e298264\" = \"There we are\";\r\n    \"fld-0c1953513df54c07ae9b30ba3c44f93e\" = 1;\r\n```\r\n\r\nI've defined my \"values\" property as such:\r\n\r\n`@property (nullable, nonatomic, strong) NSDictionary *values;`\r\n\r\nAnd in my implementation I have values defined as @dynamic:\r\n\r\n`@dynamic values;`\r\n\r\nNotice the content in the first \"fld\" dictionary key's value is different. The CBLDocument's values property contains a key with the value \"There we are again stuff\" whereas the CBLModel has \"There we are\".\r\n\r\nI would have expected that the values property in the CBLModel would contain the same data as the values property in the CBLDocument's properties dictionary.\r\n\r\nFor reference, here's the Google Groups discussion on this topic:\r\n\r\nhttps://groups.google.com/forum/?pli=1#!topic/mobile-couchbase/yNp-hi29s0M\r\n\r\n--------\r\n* Version:   1.3 commit # 372b6bfdffc2ea70cf1fe040b52dd05937bdec9c\r\n* Client OS: iOS 10.0.1\r\n* Server:    n/a\r\n"},"comment":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/comments/247443582","html_url":"https://github.com/couchbase/couchbase-lite-ios/issues/1442#issuecomment-247443582","issue_url":"https://api.github.com/repos/couchbase/couchbase-lite-ios/issues/1442","id":247443582,"user":{"login":"snej","id":43241,"avatar_url":"https://avatars.githubusercontent.com/u/43241?v=3","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T20:23:52Z","updated_at":"2016-09-15T20:23:52Z","body":"Whew, OK. I do admit that CBLModel is lacking support for handling these sorts of conflicts between an in-memory change and a document update. I've been meaning to add that forever but haven't."}}
{"actor":{"display_login":"snej"}}