Re: Sorting Relationships

From: Kevin Menard (kmenar..ervprise.com)
Date: Thu Jun 30 2005 - 10:11:16 EDT

  • Next message: Holger Hoffstätte: "Re: Sorting Relationships"

    Thanks Eric & Dhruti,

    I thought for some reason there was another way to do this (in the
    modeler or something) so one wouldn't have to override all such
    relationships. Oh well, I happen to have a small number of them, so
    no big deal.

    Thanks again,
    Kevin

    On Jun 30, 2005, at 9:45 AM, Eric Schneider wrote:

    > Kevin,
    >
    > Typically I've override the relationship method in my Object Entity
    > subclass.
    >
    > Something like:
    >
    > public List getMyRelationshipList() {
    >
    > List list = super.getMyRelationshipList();
    >
    > if (list.size() == 0) return list;
    >
    > List orderings = new ArrayList();
    > orderings.add(new Ordering("property1", Ordering.DESC));
    > orderings.add(new Ordering("property2", Ordering.DESC));
    >
    > Ordering.orderList(list, orderings);
    >
    > return list;
    > }



    This archive was generated by hypermail 2.0.0 : Thu Jun 30 2005 - 10:11:20 EDT