scala - Left outer join on Slick/Mysql -
i having trouble using left outer join in slick. i'll start code :
val articles = (for { (article, lecture) <- articledao leftjoin lecturedao on (_.id === _.idarticle) if (article.flux === idflux) } yield (article, lecture.isstarred.?)).groupby(_._1.guid).map { case (guid, rows) => rows.first }
ps : articledao
& lecturedao
objects extending table
in opposition article
& lecture
simple case classes.
this error, getting when compiling part above :
don't know how unpack (models.article, option[boolean]) t , pack g
i don't understand error. know has transformation, composition of queries have no idea how change/fix it. shed light on this?
the fix explained here: https://groups.google.com/forum/#!topic/scalaquery/bifh6be99b0 . .first
not query operation @ moment, use .min
instead.
Comments
Post a Comment