Re: Ordering using fields from multiple objects

From: Robert Zeigler (robert..uregumption.com)
Date: Thu Dec 06 2007 - 11:50:10 EST

  • Next message: Andrus Adamchik: "Re: ExtendedType and IN operator"

    Your orderings.add statement should work just fine.

    Robert

    On Dec 5, 2007, at 12/52:06 PM , Fredrik Liden wrote:

    > Hi,
    >
    > Does anyone have any advice on how to order on fields that span more
    > than one table? If I have
    >
    > Object1
    > Field1
    > Field2
    > object2 [reference to 1 object 2]
    >
    > Object2
    > Field1
    > Field2
    >
    > I'm retrieving a list of Object 1 objects but I would like sort on the
    > fields in Object 2 as well.
    >
    > Is there any chance that the following would work?
    >
    > orderings.add(new Ordering("object2.Field", true));
    >
    > Or do I need to create a raw sql query?
    >
    > Thanks,
    >
    > Fredrik



    This archive was generated by hypermail 2.0.0 : Thu Dec 06 2007 - 11:50:45 EST