Created
December 10, 2015 13:25
-
-
Save momota10/00d869175cc56aef97e8 to your computer and use it in GitHub Desktop.
slick(play-slick)3.0を使ったjoinの方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val q = for { | |
(user, pao) <- usrs.soft joinLeft paos.soft on (_.id === _.userId) | |
(pao, pa) <- paos.soft join pas.soft on (_.paId === _.id) | |
} yield (user, pao, pa) | |
db.run(q.result) map { | |
case Seq(data) => Seq(data._1.copy(pa = Some(data._3))) | |
case _ => Seq() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment