Let's say I want 10 random users from a table In SQL I would do this:

SELECT * FROM users ORDER BY random() LIMIT 10;

Is there any way (without resorting to a fully raw SQL query) to do
this with lift-mapper?  I though this would work:

Users.findAll(OrderBySql("random()", IHaveValidatedThisSQL("harryh",

This does not work, however, because when using SELECT DISTINCT you
can't ORDER BY something that you aren't selecting (in PostgreSQL at
least, might be ok in MySQL).

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to