{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/1401","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/1401/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/1401/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/1401/events","html_url":"https://github.com/realm/realm-cocoa/issues/1401","id":55255164,"number":1401,"title":"Updating with nested dictionary breaks RLMArray and RLMObject connections","user":{"login":"Just-","id":824775,"avatar_url":"https://avatars.githubusercontent.com/u/824775?v=3","gravatar_id":"","url":"https://api.github.com/users/Just-","html_url":"https://github.com/Just-","followers_url":"https://api.github.com/users/Just-/followers","following_url":"https://api.github.com/users/Just-/following{/other_user}","gists_url":"https://api.github.com/users/Just-/gists{/gist_id}","starred_url":"https://api.github.com/users/Just-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Just-/subscriptions","organizations_url":"https://api.github.com/users/Just-/orgs","repos_url":"https://api.github.com/users/Just-/repos","events_url":"https://api.github.com/users/Just-/events{/privacy}","received_events_url":"https://api.github.com/users/Just-/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-cocoa/labels/P2","name":"P2","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-23T08:07:27Z","updated_at":"2015-02-06T09:59:36Z","closed_at":null,"body":"I have such model classes `Room, Channel, User, OptionalBool`. Before updating `User` have an array of followed `Channels` and `OptionalBool` with true value.\r\n\r\n```\r\npo [BGUser allObjects]\r\nRLMResults <0x7ffb3065a600> (\r\n\t[0] BGUser {\r\n\t\t...\r\n\t\tisMine = OptionalBool {\r\n\t\tvalue = 1;\r\n\t};\r\n\t\tfollowed = RLMArray <0x7ffb30523480> (\r\n\t\t[0] BGChannel {\r\n\t\t\tidentifier = 53685;\r\n\t\t\tname = Design;\r\n\t\t\tisDefault = 1;\r\n\t\t}\r\n\t);\r\n```\r\n\r\nThen I update `Room` with calling `createOrUpdateInRealm:(RLMRealm *)realm withObject:(id)value`  with a dictionary below\r\n\r\n```\r\n{\r\n    channel = \"BGChannel {\\n\\tidentifier = 53685;\\n\\tname = Design;\\n\\tisDefault = 1;\\n}\";\r\n    code = 2;\r\n    createdAt = \"2015-01-18 12:43:45 +0000\";\r\n    identifier = 5033;\r\n    likes = 1;\r\n    messagesCount = 3;\r\n    ...\r\n    user =     {\r\n        avaUrl = \"\";\r\n        displayName = \"Tom Occhinosen\";\r\n        identifier = 2606;\r\n    };\r\n    views = 14;\r\n}\r\n```\r\n\r\nAnd after such update all followed `Channels` and `OptionalBool` connection are cleared.\r\n\r\n```\r\nBGUser {\r\n\t\tidentifier = 2501;\r\n\t\tdisplayName = Incognito 1834;\r\n\t\tavaUrl = ;\r\n\t\tisMine = (null);\r\n\t\tfollowed = RLMArray <0x7ffb32a6c2b0> (\r\n\t);\r\n```\r\n\r\nThat seems like a bug to me because updating `User` directly keeps all connections. What do I do wrong?"},"comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments/73213414","html_url":"https://github.com/realm/realm-cocoa/issues/1401#issuecomment-73213414","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/1401","id":73213414,"user":{"login":"Just-","id":824775,"avatar_url":"https://avatars.githubusercontent.com/u/824775?v=3","gravatar_id":"","url":"https://api.github.com/users/Just-","html_url":"https://github.com/Just-","followers_url":"https://api.github.com/users/Just-/followers","following_url":"https://api.github.com/users/Just-/following{/other_user}","gists_url":"https://api.github.com/users/Just-/gists{/gist_id}","starred_url":"https://api.github.com/users/Just-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Just-/subscriptions","organizations_url":"https://api.github.com/users/Just-/orgs","repos_url":"https://api.github.com/users/Just-/repos","events_url":"https://api.github.com/users/Just-/events{/privacy}","received_events_url":"https://api.github.com/users/Just-/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T09:59:36Z","updated_at":"2015-02-06T09:59:36Z","body":"@segiddins glad to help :) "}}