{"action":"created","issue":{"url":"https://api.github.com/repos/tminglei/slick-pg/issues/122","labels_url":"https://api.github.com/repos/tminglei/slick-pg/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/tminglei/slick-pg/issues/122/comments","events_url":"https://api.github.com/repos/tminglei/slick-pg/issues/122/events","html_url":"https://github.com/tminglei/slick-pg/issues/122","id":56268055,"number":122,"title":"what about jsonb?","user":{"login":"borisaka","id":7931040,"avatar_url":"https://avatars.githubusercontent.com/u/7931040?v=3","gravatar_id":"","url":"https://api.github.com/users/borisaka","html_url":"https://github.com/borisaka","followers_url":"https://api.github.com/users/borisaka/followers","following_url":"https://api.github.com/users/borisaka/following{/other_user}","gists_url":"https://api.github.com/users/borisaka/gists{/gist_id}","starred_url":"https://api.github.com/users/borisaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisaka/subscriptions","organizations_url":"https://api.github.com/users/borisaka/orgs","repos_url":"https://api.github.com/users/borisaka/repos","events_url":"https://api.github.com/users/borisaka/events{/privacy}","received_events_url":"https://api.github.com/users/borisaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-02T17:43:25Z","updated_at":"2015-02-04T02:54:17Z","closed_at":null,"body":"I've tried to use slick-pg with jsonb coulmn, but it fails with\r\n```\r\nYou will need to rewrite or cast the expression.\r\n  at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)\r\n  at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)\r\n  at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)\r\n  at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)\r\n  at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)\r\n  at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)\r\n  at com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)\r\n  at scala.slick.driver.JdbcInvokerComponent$UpdateInvoker$$anonfun$update$1.apply(JdbcInvokerComponent.scala:88)\r\n  at scala.slick.driver.JdbcInvokerComponent$UpdateInvoker$$anonfun$update$1.apply(JdbcInvokerComponent.scala:84)\r\n  at scala.slick.jdbc.JdbcBackend$SessionDef$class.withPreparedStatement(JdbcBackend.scala:191)\r\n  at scala.slick.jdbc.JdbcBackend$BaseSession.withPreparedStatement(JdbcBackend.scala:389)\r\n  at scala.slick.driver.JdbcInvokerComponent$UpdateInvoker.update(JdbcInvokerComponent.scala:84)\r\n```\r\nI've tried to add  O.DBType(\"JSONB\") to scala code, but it workless.\r\nI am newbe in slick and i haven't any sugguestions about what to do"},"comment":{"url":"https://api.github.com/repos/tminglei/slick-pg/issues/comments/72781425","html_url":"https://github.com/tminglei/slick-pg/issues/122#issuecomment-72781425","issue_url":"https://api.github.com/repos/tminglei/slick-pg/issues/122","id":72781425,"user":{"login":"tminglei","id":1828949,"avatar_url":"https://avatars.githubusercontent.com/u/1828949?v=3","gravatar_id":"","url":"https://api.github.com/users/tminglei","html_url":"https://github.com/tminglei","followers_url":"https://api.github.com/users/tminglei/followers","following_url":"https://api.github.com/users/tminglei/following{/other_user}","gists_url":"https://api.github.com/users/tminglei/gists{/gist_id}","starred_url":"https://api.github.com/users/tminglei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tminglei/subscriptions","organizations_url":"https://api.github.com/users/tminglei/orgs","repos_url":"https://api.github.com/users/tminglei/repos","events_url":"https://api.github.com/users/tminglei/events{/privacy}","received_events_url":"https://api.github.com/users/tminglei/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T02:54:17Z","updated_at":"2015-02-04T02:54:17Z","body":"Hi @borisaka you can declare mixed pg types of json and jsonb, but not simply using O.DBType(\"JSON\")/O.DBType(\"JSONB\").\r\nBecause it's not easy to dynamically extract pg type from column instance.\r\n\r\nInstead, you should define another json type mapper, which bind to the pg json type and another scala type. Then when you use the new scala type to declare column, you got you want.\r\n\r\n_This is not convenient, but I haven't a simple solution to resolve it._"}}