如何将Set [String]作为查询参数传递给anorm?

时间:2012-06-24 02:08:11

标签: playframework playframework-2.0 anorm

我想形成一个涉及一组字符串作为参数的SQL查询:

SQL("SELECT * FROM TABLE somecolumn in {someset}")
.on("someset" -> Set("v1', "v2", "v3"))

但上面生成的SQL查询无效:

play.api.Application$$anon$1: Execution exception [[MySQLSyntaxErrorException: You have an   error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '_binary'??\0sr\0\'scala.collection.immutable.$colon$colon?\\c[???m\0L\0+scala' at line 1]]

在集合中是否不支持集合/可遍历作为参数类型,或者有不同的方法来执行此操作?

0 个答案:

没有答案