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
{{ message }}
This repository was archived by the owner on Aug 31, 2022. It is now read-only.
I am pretty much new to sorm framework and decided to try it because of its API simplicity but unfortunately get this exception during 'fetch by id' operation. Please provide some advice on code below:
importorg.h2.tools.Serverimportorg.scalatest.{BeforeAndAfterAll, Matchers, WordSpec}
classDatabaseSpecextendsWordSpecwithMatcherswithBeforeAndAfterAll {
"Database" should {
"provide value by id" in {
valpost=Post("title", "azaza")
valsaved=Database.save(post)
println(Database.fetchById(saved.id))
}
}
overrideprotecteddefbeforeAll():Unit=Server.createTcpServer("-tcpAllowOthers").start()
}
Please find full stack trace below:
[info] - should provide value by id ***FAILED***
[info] sorm.core.SormException:Entity `Nothing` is not registered
[info] at sorm.Instance$Api$$anonfun$mapping$1$1.apply(Instance.scala:57)
[info] at sorm.Instance$Api$$anonfun$mapping$1$1.apply(Instance.scala:57)
[info] at scala.Option.getOrElse(Option.scala:121)
[info] at sorm.Instance$Api$class.mapping$1(Instance.scala:56)
[info] at sorm.Instance$Api$class.sorm$Instance$Api$$mapping(Instance.scala:61)
[info] at sorm.Instance$Api$$anonfun$fetchById$1$$anonfun$apply$10.apply(Instance.scala:117)
[info] at sorm.Instance$Api$$anonfun$fetchById$1$$anonfun$apply$10.apply(Instance.scala:117)
[info] at embrace.package$EmbraceAny$.$$extension(package.scala:6)
[info] at sorm.Instance$Api$$anonfun$fetchById$1.apply(Instance.scala:117)
[info] at sorm.Instance$Api$$anonfun$fetchById$1.apply(Instance.scala:116)
Thanks in advance,
Oleksii
The text was updated successfully, but these errors were encountered:
Hi, guys,
I am pretty much new to sorm framework and decided to try it because of its API simplicity but unfortunately get this exception during 'fetch by id' operation. Please provide some advice on code below:
Please find full stack trace below:
Thanks in advance,
Oleksii
The text was updated successfully, but these errors were encountered: