Created
November 15, 2013 14:24
-
-
Save arturaz/7485096 to your computer and use it in GitHub Desktop.
How do I turn this slick method into a subquery?
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 myRank = (session: Session) => { | |
val mine = Ratings.filter(_.userId === user.id).map(mapper). | |
first()(session) | |
Ratings.filter { mapper(_) > mine }.map(_.length + 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment