{"action":"closed","issue":{"url":"https://api.github.com/repos/scalikejdbc/scalikejdbc/issues/500","repository_url":"https://api.github.com/repos/scalikejdbc/scalikejdbc","labels_url":"https://api.github.com/repos/scalikejdbc/scalikejdbc/issues/500/labels{/name}","comments_url":"https://api.github.com/repos/scalikejdbc/scalikejdbc/issues/500/comments","events_url":"https://api.github.com/repos/scalikejdbc/scalikejdbc/issues/500/events","html_url":"https://github.com/scalikejdbc/scalikejdbc/issues/500","id":135293267,"number":500,"title":"Allow using Int type for auto-generated key in SQLUpdateWithGeneratedKey","user":{"login":"cppexpert","id":1280853,"avatar_url":"https://avatars.githubusercontent.com/u/1280853?v=3","gravatar_id":"","url":"https://api.github.com/users/cppexpert","html_url":"https://github.com/cppexpert","followers_url":"https://api.github.com/users/cppexpert/followers","following_url":"https://api.github.com/users/cppexpert/following{/other_user}","gists_url":"https://api.github.com/users/cppexpert/gists{/gist_id}","starred_url":"https://api.github.com/users/cppexpert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cppexpert/subscriptions","organizations_url":"https://api.github.com/users/cppexpert/orgs","repos_url":"https://api.github.com/users/cppexpert/repos","events_url":"https://api.github.com/users/cppexpert/events{/privacy}","received_events_url":"https://api.github.com/users/cppexpert/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-22T02:15:32Z","updated_at":"2016-02-22T02:18:42Z","closed_at":"2016-02-22T02:18:42Z","body":"Just stumbled upon issue for which I  couldn't find workaround. I have INT column for which `SQLUpdateWithGeneratedKey` fails with following exception\r\n\r\n```\r\norg.postgresql.util.PSQLException: Bad value for type long : Test user\r\n\tat org.postgresql.jdbc.PgResultSet.toLong(PgResultSet.java:3092)\r\n\tat org.postgresql.jdbc.PgResultSet.getLong(PgResultSet.java:2235)\r\n\tat scalikejdbc.DBSession$$anonfun$4.liftedTree2$1(DBSession.scala:551)\r\n\tat scalikejdbc.DBSession$$anonfun$4.apply(DBSession.scala:546)\r\n\tat scalikejdbc.DBSession$$anonfun$4.apply(DBSession.scala:534)\r\n\tat scalikejdbc.DBSession$$anonfun$updateWithFilters$1.apply(DBSession.scala:473)\r\n\tat scalikejdbc.DBSession$$anonfun$updateWithFilters$1.apply(DBSession.scala:470)\r\n\tat scalikejdbc.LoanPattern$class.using(LoanPattern.scala:18)\r\n\tat scalikejdbc.ActiveSession.scalikejdbc$DBSession$$super$using(DBSession.scala:701)\r\n\tat scalikejdbc.DBSession$class.using(DBSession.scala:30)\r\n\tat scalikejdbc.ActiveSession.using(DBSession.scala:701)\r\n\tat scalikejdbc.DBSession$class.updateWithFilters(DBSession.scala:469)\r\n\tat scalikejdbc.ActiveSession.updateWithFilters(DBSession.scala:701)\r\n\tat scalikejdbc.DBSession$class.updateAndReturnSpecifiedGeneratedKey(DBSession.scala:559)\r\n\tat scalikejdbc.ActiveSession.updateAndReturnSpecifiedGeneratedKey(DBSession.scala:701)\r\n\tat scalikejdbc.SQLUpdateWithGeneratedKey$$anonfun$10.apply(SQL.scala:598)\r\n\tat scalikejdbc.SQLUpdateWithGeneratedKey$$anonfun$10.apply(SQL.scala:598)\r\n\tat scalikejdbc.DBConnection$class.autoCommit(DBConnection.scala:222)\r\n\tat scalikejdbc.DB.autoCommit(DB.scala:60)\r\n\tat scalikejdbc.DB$$anonfun$autoCommit$1.apply(DB.scala:216)\r\n\tat scalikejdbc.DB$$anonfun$autoCommit$1.apply(DB.scala:215)\r\n\tat scalikejdbc.LoanPattern$class.using(LoanPattern.scala:18)\r\n\tat scalikejdbc.DB$.using(DB.scala:139)\r\n\tat scalikejdbc.DB$.autoCommit(DB.scala:215)\r\n\tat scalikejdbc.SQLUpdateWithGeneratedKey.apply(SQL.scala:601)\r\n```\r\n\r\nWhat if  we add generic parameter to `SQLUpdateWithGeneratedKey` so client can use different types?"}}