Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们在使用 Slick 管理数据库中的图像时遇到了一些问题。它们以 Array[Byte] 格式存储。我阅读的每个来源都告诉我它应该可以工作,但我不断收到此错误:
could not find implicit value for parameter conv: scala.slick.jdbc.GetResult[Array[Byte]]
编译器告诉我没有为 Array[Byte] 找到映射器。我一定错过了一个简单的导入,但我似乎找不到它。
You need an implicit GetResult in scope to map from the db result to the Array[Byte] that you want. Try adding the following just before your query:
GetResult
Array[Byte]
implicit val GetByteArr = GetResult(r => r.nextBytes)