{"action":"opened","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/3269","repository_url":"https://api.github.com/repos/realm/realm-cocoa","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3269/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3269/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3269/events","html_url":"https://github.com/realm/realm-cocoa/issues/3269","id":136521813,"number":3269,"title":"Create a SET from Existing Value.","user":{"login":"Dfmarulanda","id":2466498,"avatar_url":"https://avatars.githubusercontent.com/u/2466498?v=3","gravatar_id":"","url":"https://api.github.com/users/Dfmarulanda","html_url":"https://github.com/Dfmarulanda","followers_url":"https://api.github.com/users/Dfmarulanda/followers","following_url":"https://api.github.com/users/Dfmarulanda/following{/other_user}","gists_url":"https://api.github.com/users/Dfmarulanda/gists{/gist_id}","starred_url":"https://api.github.com/users/Dfmarulanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dfmarulanda/subscriptions","organizations_url":"https://api.github.com/users/Dfmarulanda/orgs","repos_url":"https://api.github.com/users/Dfmarulanda/repos","events_url":"https://api.github.com/users/Dfmarulanda/events{/privacy}","received_events_url":"https://api.github.com/users/Dfmarulanda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-25T21:47:26Z","updated_at":"2016-02-25T21:47:26Z","closed_at":null,"body":"## Goals\r\n\r\nHello Everyone. I have some objects in my backend that i'm sending to my iOS App. The idea is just to add the new objects (not updating the existing ones) so, i created a SET with my online data, and i'm trying to compare it with my realm data. \r\n\r\n## Expected Results\r\n\r\nI expect to substract the realm data from the online data in order to add the new data.\r\n\r\n## Actual Results\r\n\r\nActual Data = 175 Objects.\r\nSubstract = 175 Objects\r\nUnion = 350 Objects\r\n\r\nSo, nothing is happening when i'm working with the sets. When i'm priting directly from \r\n```swift\r\nrealm.objects(Incident).toArray()\r\n```\r\nI get the expected print (With all my objects filled)\r\nBut when i make a array \r\n\r\n```swift\r\nlet x = realm.objects(Incident).toArray()\r\nprint(x)\r\n```\r\nI get all values as nil.\r\n\r\n## Steps to Reproduce\r\n\r\ncreate a SET from Array\r\n\r\n   let b = Set(config.incidents)\r\nl\r\n\r\n## Code Sample\r\n\r\n> Provide a code sample that highlights the issue.\r\n> If relevant, include your model definitions.\r\n> For larger code samples, links to external gists or repositories are preferred.\r\n> Full Xcode projects that we can compile ourselves are ideal.\r\n\r\n## Version of Realm and Tooling\r\n\r\n> Share which versions of Realm are affected, the Xcode and OS X version\r\n> on which you compile, as well as the version of the\r\n> dependency manager involved (CocoaPods / Carthage).\r\n> [In the CONTRIBUTING guidelines](https://git.io/vgxJO), you will find\r\n> a script, which will help with that."}}