I've run into the error below, which might be related to this ticket?
https://github.com/slick/slick/issues/549
Is there a workaround? Should I make a synthetic column which gives the optional field a default value like -1 ?
Here's the error:
Exception in thread "main" scala.slick.SlickException: Caught exception while computing default value for Rep[Option[_]].getOrElse -- This cannot be done lazily when the value is needed on the database side
at scala.slick.compiler.HoistClientOps.rewriteDBSide(HoistClientOps.scala:90)
at scala.slick.compiler.HoistClientOps$$anonfun$rewriteDBSide$1.apply(HoistClientOps.scala:95)
at scala.slick.compiler.HoistClientOps$$anonfun$rewriteDBSide$1.apply(HoistClientOps.scala:95)
at scala.slick.ast.Util$$anonfun$mapOrNone$1.apply(Util.scala:15)
at scala.slick.ast.Util$$anonfun$mapOrNone$1.apply(Util.scala:14)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)