{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/2377","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2377/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2377/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2377/events","html_url":"https://github.com/realm/realm-cocoa/issues/2377","id":100260239,"number":2377,"title":"InitWithValue without scheme","user":{"login":"MarcAudefroy","id":2056363,"avatar_url":"https://avatars.githubusercontent.com/u/2056363?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcAudefroy","html_url":"https://github.com/MarcAudefroy","followers_url":"https://api.github.com/users/MarcAudefroy/followers","following_url":"https://api.github.com/users/MarcAudefroy/following{/other_user}","gists_url":"https://api.github.com/users/MarcAudefroy/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcAudefroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcAudefroy/subscriptions","organizations_url":"https://api.github.com/users/MarcAudefroy/orgs","repos_url":"https://api.github.com/users/MarcAudefroy/repos","events_url":"https://api.github.com/users/MarcAudefroy/events{/privacy}","received_events_url":"https://api.github.com/users/MarcAudefroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-11T08:45:52Z","updated_at":"2015-08-13T15:38:09Z","closed_at":null,"body":"Hi!\r\n\r\nIn my project, I would initialize an RealmObject with a dictionary. This object has a primary key \"identifier\". When I use initWithValue with a dictionary (which does not contain identifier) in order to start fill the object, app crashes. Why? Because initWithValue validates each realmObject's property value. \r\n\r\nI see initWithValue like an init method but with \"default values\". Given that addObject method validates primaryKey or optional property. Why verify the property in the initWithValue method?\r\n\r\nIt's possible to use a method taking a dictionary or array variable and fill the realmObject without validating? \r\n\r\nThanks.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments/130732433","html_url":"https://github.com/realm/realm-cocoa/issues/2377#issuecomment-130732433","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2377","id":130732433,"user":{"login":"segiddins","id":1946610,"avatar_url":"https://avatars.githubusercontent.com/u/1946610?v=3","gravatar_id":"","url":"https://api.github.com/users/segiddins","html_url":"https://github.com/segiddins","followers_url":"https://api.github.com/users/segiddins/followers","following_url":"https://api.github.com/users/segiddins/following{/other_user}","gists_url":"https://api.github.com/users/segiddins/gists{/gist_id}","starred_url":"https://api.github.com/users/segiddins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segiddins/subscriptions","organizations_url":"https://api.github.com/users/segiddins/orgs","repos_url":"https://api.github.com/users/segiddins/repos","events_url":"https://api.github.com/users/segiddins/events{/privacy}","received_events_url":"https://api.github.com/users/segiddins/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T15:38:09Z","updated_at":"2015-08-13T15:38:09Z","body":"I personally don't find it inconsistent with `init`, since the promise there is that you will fill in all of the properties without default values. If you're not creating the object all in one go, just using `init` and manually setting properties is probably going to be the recommended approach."}}