{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/777","labels_url":"https://api.github.com/repos/realm/realm-java/issues/777/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/777/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/777/events","html_url":"https://github.com/realm/realm-java/issues/777","id":55131966,"number":777,"title":"Default values for fields","user":{"login":"erichkleung","id":1387762,"avatar_url":"https://avatars.githubusercontent.com/u/1387762?v=3","gravatar_id":"","url":"https://api.github.com/users/erichkleung","html_url":"https://github.com/erichkleung","followers_url":"https://api.github.com/users/erichkleung/followers","following_url":"https://api.github.com/users/erichkleung/following{/other_user}","gists_url":"https://api.github.com/users/erichkleung/gists{/gist_id}","starred_url":"https://api.github.com/users/erichkleung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erichkleung/subscriptions","organizations_url":"https://api.github.com/users/erichkleung/orgs","repos_url":"https://api.github.com/users/erichkleung/repos","events_url":"https://api.github.com/users/erichkleung/events{/privacy}","received_events_url":"https://api.github.com/users/erichkleung/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Feature","name":"Feature","color":"c7def8"},{"url":"https://api.github.com/repos/realm/realm-java/labels/P2","name":"P2","color":"dedede"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-22T09:34:09Z","updated_at":"2015-11-17T09:24:23Z","closed_at":null,"body":"Question/request: \r\nWill the java version have default values for fields similar to the iOS one? \r\n\r\ni.e.\r\n+defaultPropertyValues can be overriden to provide default values every time an object is created.\r\n\r\nThis might also helps to alleviate the lack of null support in the interim (and with the standalone object support now, helps with gson deserialization a bunch) \r\n\r\nThanks for all the awesome work on this! "},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/157317345","html_url":"https://github.com/realm/realm-java/issues/777#issuecomment-157317345","issue_url":"https://api.github.com/repos/realm/realm-java/issues/777","id":157317345,"user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T09:24:23Z","updated_at":"2015-11-17T09:24:23Z","body":"Ideally yes, but it looks like there is a major limitation for annotations. It looks like we cannot do:\r\n```\r\npublic @interface DefaultValue {\r\n    Object value();\r\n}\r\n```\r\n\r\nThat pretty much makes my proposal impossible :("}}