{"action":"created","issue":{"url":"https://api.github.com/repos/gabrielittner/auto-value-cursor/issues/55","repository_url":"https://api.github.com/repos/gabrielittner/auto-value-cursor","labels_url":"https://api.github.com/repos/gabrielittner/auto-value-cursor/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/gabrielittner/auto-value-cursor/issues/55/comments","events_url":"https://api.github.com/repos/gabrielittner/auto-value-cursor/issues/55/events","html_url":"https://github.com/gabrielittner/auto-value-cursor/issues/55","id":190277125,"number":55,"title":"Special handling for autogenerated _id columns?","user":{"login":"ened","id":269860,"avatar_url":"https://avatars.githubusercontent.com/u/269860?v=3","gravatar_id":"","url":"https://api.github.com/users/ened","html_url":"https://github.com/ened","followers_url":"https://api.github.com/users/ened/followers","following_url":"https://api.github.com/users/ened/following{/other_user}","gists_url":"https://api.github.com/users/ened/gists{/gist_id}","starred_url":"https://api.github.com/users/ened/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ened/subscriptions","organizations_url":"https://api.github.com/users/ened/orgs","repos_url":"https://api.github.com/users/ened/repos","events_url":"https://api.github.com/users/ened/events{/privacy}","received_events_url":"https://api.github.com/users/ened/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-18T09:50:12Z","updated_at":"2016-11-23T01:27:30Z","closed_at":null,"body":"On Android, `_id` columns are usually set as primary keys (`INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL`). \r\n\r\nWhen I want to read them:\r\n```\r\n@ColumnName(\"_id\") public abstract int getId();\r\n```\r\n\r\nThen Auto-Value-Cursor (and auto-value, for that matter) insists on creating a constructor parameter.\r\n\r\nAs a workaround, I was able to use `@Nullable Integer` and pass `null` to the constructor, but that reads incorrect. "},"comment":{"url":"https://api.github.com/repos/gabrielittner/auto-value-cursor/issues/comments/262415030","html_url":"https://github.com/gabrielittner/auto-value-cursor/issues/55#issuecomment-262415030","issue_url":"https://api.github.com/repos/gabrielittner/auto-value-cursor/issues/55","id":262415030,"user":{"login":"ened","id":269860,"avatar_url":"https://avatars.githubusercontent.com/u/269860?v=3","gravatar_id":"","url":"https://api.github.com/users/ened","html_url":"https://github.com/ened","followers_url":"https://api.github.com/users/ened/followers","following_url":"https://api.github.com/users/ened/following{/other_user}","gists_url":"https://api.github.com/users/ened/gists{/gist_id}","starred_url":"https://api.github.com/users/ened/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ened/subscriptions","organizations_url":"https://api.github.com/users/ened/orgs","repos_url":"https://api.github.com/users/ened/repos","events_url":"https://api.github.com/users/ened/events{/privacy}","received_events_url":"https://api.github.com/users/ened/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T01:27:30Z","updated_at":"2016-11-23T01:27:30Z","body":"`@Nullable` approach works, yet semantically it's not correct. `_id` is null *only* for new objects, but *never* for objects actually returned from the database.\r\nCombined with `Builder` classes this is more incorrect, as AutoValue forces me to implement `setId()` there.\r\n\r\n`@Generated` ?"}}
{"actor":{"display_login":"ened"}}