Hello, I'm having a problem and I'm sure it's an easy fix for someone
with a bit more experience
I have 3 model classes: tag, user, tweet and a join class TagUser. A
tag has a list of users.
If i want all of the users in a tag i use the following code (which
works):
def users = TagUser.findAll(By(TagUser.tag, this.id)).map
(_.user.obj.open_!)
my problem is that i can't figure out how to apply queryparams so i
don't pull out all of the users from the DB if i don't need em. I was
thinking something like this (doesn't compile):
def getTopUsers(in: Int) :List[User] = {
TagUser.findAll(By(TagUser.tag, this.id),
OrderBy(User.followers_count, Descending),
MaxRows(in))
}
I get the following error:
[ERROR] ... error: overloaded method value findAll with alternatives
(net.liftweb.mapper.QueryParam[scalableKvidr.model.TagUser]*)List
[scalableKvidr.model.TagUser] <and> ()List
[scalableKvidr.model.TagUser] cannot be applied to
(net.liftweb.mapper.Cmp
[scalableKvidr.model.TagUser,Long],net.liftweb.mapper.OrderBy
[scalableKvidr.model.User,Int],net.liftweb.mapper.MaxRows[Nothing])
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.