1

I try to save a case class with field of Set type. Something like this:

case class MyObject(setOfString:Set[String]) 

When I get my MyObject from db, i have this error:

The future returned an exception of type: java.lang.ClassCastException, with message: scala.collection.immutable.$colon$colon cannot be cast to scala.collection.immutable.Set.

Mongo version:

"org.mongodb.scala"      %%  "mongo-scala-driver"     % "2.1.0"

Any idea how can i force Set type to mongo driver?

mkUltra
  • 2,828
  • 1
  • 22
  • 47

0 Answers0