cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Zeigler <robe...@puregumption.com>
Subject Re: Ordering using fields from multiple objects
Date Thu, 06 Dec 2007 16:50:10 GMT
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


Mime
View raw message