For now if you really need to tweak how relationship is fetched, you
may have to use a custom query and store returned list as an ivar
somewhere instead of relying on default relationship logic.
The other option that Neil mentioned (IndexPropertyList) is not yet
available for DataContext... But it will be soon.
Andrus
On Nov 7, 2005, at 11:26 PM, Dhruti Ramani wrote:
> Thanks for replying. I was aware of this but when we have a query
> that returns large number of rows then its not a good idea to get
> the list and then sort it.
>
> Thanks,
> Denna
>
> Neil Pierson <neil.pierso..mail.com> wrote:
> To the best of my knowledge, relationships do not return objects
> with an order. You can do something like this:
>
> List list = someObject.getRelatedObjects;
> Ordering ord = new Ordering
> (RelatedObjects.SOME_PROPERTY, Ordering.ASC);
> ord.orderList(list);
>
> On 11/7/05, Dhruti Ramani <dhrutiraman..ahoo.com> wrote:
> I am using cayenne1.1 and Postgresql as my database. I have two
> objects Address and USState and 1 to M relation between them. Every
> time i print a list of USStates it prints in different order, like
> sometime NY, NJ, and sometime NJ, NY. I am not using any Ordering.
> Is there a way to tell cayenne that get the list in some order? For
> getting the list i am using method that cayenne provides.
>
> Thanks,
> Denna
This archive was generated by hypermail 2.0.0 : Mon Nov 07 2005 - 15:44:31 EST