You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [10 seconds]
at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)
at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)
at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
at scala.concurrent.Await$.result(package.scala:190)
at com.snapswap.slick.SlickNoneGetError$.delayedEndpoint$com$snapswap$slick$SlickNoneGetError$1(SlickNoneGetError.scala:72)
at com.snapswap.slick.SlickNoneGetError$delayedInit$body.apply(SlickNoneGetError.scala:12)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at com.snapswap.slick.SlickNoneGetError$.main(SlickNoneGetError.scala:12)
at com.snapswap.slick.SlickNoneGetError.main(SlickNoneGetError.scala)
Interesting thing: if option field error setted no error happens (insert a1 as example), but if that field is empty code ruins with error.
As work around you can introduce some of Database Object (DO) and then cover your nested model object to flat DO case class.
The text was updated successfully, but these errors were encountered:
It looks to me like your mapping function needs to return Some(None) on line 34.
However, there's a good case that the meaning of that R => Option[U] function should be explained in the manual. It's not clear what returning None could mean.
@d6y Thank, add Some(None) fixing the problem, but it's totally unclear why :), for strong type safe mapping. like Slick, this case need more clear way to solve.
Alternative way is work, but if you have only one model. without separation DO and Application models, your whole application begin know about slick mapping specific things.
Simple code to reproduce error on last Slick 3.2.1 version:
https://github.com/snap-swap/slick-none-get-exception
Example code is: https://github.com/snap-swap/slick-none-get-exception/blob/master/src/main/scala/com/snapswap/slick/SlickNoneGetError.scala
If you run code you get exception:
Interesting thing: if option field
error
setted no error happens (insert a1 as example), but if that field is empty code ruins with error.As work around you can introduce some of Database Object (DO) and then cover your nested model object to flat DO case class.
The text was updated successfully, but these errors were encountered: