Re: to-many & List

From: Eric Schneider (eri..entralparksoftware.com)
Date: Thu Jun 03 2004 - 14:23:30 EDT

  • Next message: Mike Kienenberger: "Re: to-many & List"

    Bill,

    You can override the relationship in your entities subclass and perform the
    ordering in memory.

    Something like:

    public List getMyToMany() {
        List list = super.getMyToMany();

        Ordering ordering = new Ordering("thePropertyToOrderBy", Ordering.ASC);
        ordering.orderList(list);
        return list;
    }

    e.

    ----- Original Message -----
    From: "Mike Kienenberger" <mkienen..laska.net>
    To: "Bill Dudney" <bdudne..ac.com>
    Cc: <cayenne-use..bjectstyle.org>
    Sent: Thursday, June 03, 2004 1:12 PM
    Subject: Re: to-many & List

    > Bill Dudney <bdudne..ac.com> wrote:
    > > I'd assume its in whatever order they are coming from the DB but wanted
    > > to ask.
    >
    > You can using Ordering to specify a specific ordering, or you can take
    them
    > however the database sends them which is what happens if you fail to
    specify
    > an ordering.
    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Thu Jun 03 2004 - 14:24:11 EDT