这是我要执行的 scalaquery 查询,
...
def generateFares(scheduleId:NamedColumn[Int], toCityId:NamedColumn[Int], fromCityId:NamedColumn[Int]):List[(String,Int,String)] = {
var list:List[(String,Int,String)] = Nil;
val q = for {
tf <- ticketingDB.ticketFares if (( tf.scheduleId is scheduleId ) && ( tf.fromCityId is fromCityId ) && ( tf.toCityId is toCityId ))
tft <- ticketingDB.ticketFareType if tft.id is tf._7
}{
list = (tft._2, tf._5, tf._6)::list
}
list
}
...
在这个连接中,我得到一个编译错误:
could not find implicit value for parameter session: org.scalaquery.session.Session
在第二次通话中。(tft <-票务数据库)
我无法理解 scalaquery 的这种行为。
ps:我可以确保在 withSession 块内调用该方法。
请帮我调试并创建无错误加入。