Re: about Ordering in Cayenne

From: Dhruti Ramani (dhrutiraman..ahoo.com)
Date: Thu May 05 2005 - 15:31:29 EDT

  • Next message: Joshua Pyle: "Re: about Ordering in Cayenne"

    Thanks Cris,
     
    I found other way to do it.
     
    Thanks
    Denna

    Cris Daniluk <cris.danilu..mail.com> wrote:
    You can order by dates. However, you need to order on the ObjEntity
    property and not necessarily the field name. Your vague example does
    not make it clear what you are doing. However, if your ObjEntity is
    called SomeObject, I would prefer this:

    Ordering ordering = new Ordering(SomeObject.ABC_PROPERTY, true);

    That way you're sure you aren't actually using the database field
    name. Also, the way you are doing this Ordering, its sorting the List,
    as opposed to having the database sort the results for you. Is this
    what you want?

    Cris

    > I have a list of SomeObjects. And "abc" is the date field of that. To sort
    > that list by abc I have done following but its not working.
    >
    > Ordering ordering=new Ordering("abc",true);
    > ordering.orderList(list);
    >
    > But it does do ordering on that list. Am I doing something wrong? Ordering
    > can work with Date?
    >
    > Thanks
    > Denna
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Tired of spam? Yahoo! Mail has the best spam protection around
    > http://mail.yahoo.com

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com



    This archive was generated by hypermail 2.0.0 : Thu May 05 2005 - 15:31:35 EDT