esta es una consulta scalaquery que quiero realizar,problema scalaquery ninguna sesión implícita
...
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
}
...
En este unirse, estoy recibiendo un error de compilación:
could not find implicit value for parameter session: org.scalaquery.session.Session
en la segunda llamada. (tft < - ticketingDB)
no puedo entender este comportamiento de scalaquery.
ps: puedo asegurar que el método se llama dentro de un bloque withSession.
por favor ayúdame a eliminar errores y crear uniones sin errores.
siento molestarlos, pero me di cuenta de la solución. No había importado threadLocalSession al archivo. import org.scalaquery.session.Database.threadLocalSession – tiran
si encuentra la respuesta por su cuenta, publíquela como respuesta. – geowa4