{"action":"created","issue":{"url":"https://api.github.com/repos/jdbi/jdbi/issues/1207","repository_url":"https://api.github.com/repos/jdbi/jdbi","labels_url":"https://api.github.com/repos/jdbi/jdbi/issues/1207/labels{/name}","comments_url":"https://api.github.com/repos/jdbi/jdbi/issues/1207/comments","events_url":"https://api.github.com/repos/jdbi/jdbi/issues/1207/events","html_url":"https://github.com/jdbi/jdbi/issues/1207","id":348752977,"node_id":"MDU6SXNzdWUzNDg3NTI5Nzc=","number":1207,"title":"@ColumnName just working on val, not var properties intentional?","user":{"login":"jmbremer","id":6649306,"node_id":"MDQ6VXNlcjY2NDkzMDY=","avatar_url":"https://avatars1.githubusercontent.com/u/6649306?v=4","gravatar_id":"","url":"https://api.github.com/users/jmbremer","html_url":"https://github.com/jmbremer","followers_url":"https://api.github.com/users/jmbremer/followers","following_url":"https://api.github.com/users/jmbremer/following{/other_user}","gists_url":"https://api.github.com/users/jmbremer/gists{/gist_id}","starred_url":"https://api.github.com/users/jmbremer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmbremer/subscriptions","organizations_url":"https://api.github.com/users/jmbremer/orgs","repos_url":"https://api.github.com/users/jmbremer/repos","events_url":"https://api.github.com/users/jmbremer/events{/privacy}","received_events_url":"https://api.github.com/users/jmbremer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-08T14:32:15Z","updated_at":"2018-08-09T06:28:14Z","closed_at":null,"author_association":"NONE","body":"As the title says: Am I missing something in finding @ColumnName to work fine on val properties (within a *data* class in this case), but being completely ignored when switching the same property over to var? What's the hint in the documentation that I am noobishly missing? Thank you!"},"comment":{"url":"https://api.github.com/repos/jdbi/jdbi/issues/comments/411651117","html_url":"https://github.com/jdbi/jdbi/issues/1207#issuecomment-411651117","issue_url":"https://api.github.com/repos/jdbi/jdbi/issues/1207","id":411651117,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTY1MTExNw==","user":{"login":"jmbremer","id":6649306,"node_id":"MDQ6VXNlcjY2NDkzMDY=","avatar_url":"https://avatars1.githubusercontent.com/u/6649306?v=4","gravatar_id":"","url":"https://api.github.com/users/jmbremer","html_url":"https://github.com/jmbremer","followers_url":"https://api.github.com/users/jmbremer/followers","following_url":"https://api.github.com/users/jmbremer/following{/other_user}","gists_url":"https://api.github.com/users/jmbremer/gists{/gist_id}","starred_url":"https://api.github.com/users/jmbremer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmbremer/subscriptions","organizations_url":"https://api.github.com/users/jmbremer/orgs","repos_url":"https://api.github.com/users/jmbremer/repos","events_url":"https://api.github.com/users/jmbremer/events{/privacy}","received_events_url":"https://api.github.com/users/jmbremer/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T06:28:14Z","updated_at":"2018-08-09T06:28:14Z","author_association":"NONE","body":"Notice the test I set up within the same project as above.\r\n\r\n```\r\nCREATE TABLE Foo(\r\n  no    Int PRIMARY KEY,\r\n  name  Varchar);\r\n\r\nCREATE TABLE Bar(\r\n  fooNo Int,\r\n  no    Int,\r\n  note  Varchar,\r\n  PRIMARY KEY (fooNo, no),\r\n  FOREIGN KEY (fooNo) REFERENCES Foo);\r\n\r\nINSERT INTO Foo VALUES\r\n    (1, 'Steve'),\r\n    (2, 'Bob');\r\n\r\nINSERT INTO Bar VALUES\r\n    (1, 1, 'Apple'),\r\n    (1, 2, 'Turtle'),\r\n    (2, 1, 'Banana');\r\n```\r\n\r\n```\r\ndata class Foo(@ColumnName(\"f_no\") var no: Int, var name: String)\r\n\r\ndata class Bar(val no: Int, var note: String)\r\n\r\ninterface BarDAO {\r\n\r\n    @RegisterJoinRowMapper(Foo::class, Bar::class)\r\n    @SqlQuery(\"\"\"\r\n        SELECT f.no AS f_no, f.name, b.*\r\n        FROM Foo f JOIN Bar b ON b.fooNo = f.no\r\n        WHERE b.fooNo = :fooNo AND b.no = :no\r\n        \"\"\")\r\n    fun findBarWithFoo(fooNo: Int, no: Int): JoinRow\r\n}\r\n```\r\n\r\nThis works fine:\r\n```\r\nval b = barDAO.findBarWithFoo(1, 2)\r\nval foo = b.get(Foo::class.java)\r\nval bar = b[Bar::class.java]\r\nlogger.debug { \"Foo = $foo, bar = $bar\" }\r\n```\r\n\r\n\r\n\r\nVersions:\r\n- Kotlin: 1.2.51\r\n- JDBI: 3.3.0\r\n- PostgreSQL: 42.1.4\r\n- (Dropwizard: 1.3.5)"}}
{"actor":{"display_login":"jmbremer"}}