Re: ORDER BY RANDOM

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Apr 27 2004 - 10:45:16 EDT

  • Next message: Jorge Sopena: "Recovering PK from a new Object"

    On Apr 27, 2004, at 8:48 AM, Todd O'Bryan wrote:

    > How do I get a random ordering for a SelectQuery equivalent to ORDER
    > BY RANDOM?
    >
    > Thanks,
    > Todd

    This looks like some proprietary extension; you can't do it in Cayenne.
    Instead you can use Collections.shuffle() on the resulting list, which
    should be as fast and efficient.

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Apr 27 2004 - 10:45:21 EDT