我试图在Slick提升的查询中映射到List
,我收到编译错误:
No matching Shape found.
[error] Slick does not know how to map the given types.
[error] Possible causes: T in Table[T] does not match your * projection. Or you use an unsupported type in a Query (e.g. scala List).
[error] Required level: scala.slick.lifted.FlatShapeLevel
[error] Source type: Seq[String]
[error] Unpacked type: T
[error] Packed type: G
为什么在非Slick地图操作中,我可以映射到任何类型,而在Slick查询中,我可以映射到简单的Scala类型,但不能映射到Scala List
?
答案 0 :(得分:0)
尝试
import slick.driver.(yourDB)Driver.api._