Re: Sorting Relationships

From: Jürgen Saar (jsaa..eb.de)
Date: Fri Jul 01 2005 - 03:56:39 EDT

  • Next message: Jürgen Saar: "Re: Empty Constructor"

    For our project, sorting relationships was mission critical.

    Especially in printing, the sorting of relation data is
    a keyfeature. We added a Map with the orderby-infos
    to the DataObject. The Business-Applications can
    put sorting information via key relationname into
    the map and in the readProperty the sorting is
    done as configured in the map.

    There was a special problem left:

    From our point of view, all starts with a root businessobject
    and here all sorting wishes would be configured.
    So there could be an sorting for Xobject.rel1.rel2.rel3

    So we had do write our own ListIterator for relations
    to give sorting wishes from re1 to rel2 and so on
    until the relation to sort was reached.

    cayenne-use..bjectstyle.org schrieb am 30.06.05 16:42:12:
    >
    > I agree. It's usually not too much trouble to wrap the relationship if
    > really needed to sort it -- or just fetch them in the order you need. If
    > the destination is a GUI, I'd argue the GUI should be responsible for
    > sorting and not Cayenne. The presentation of data probably shouldn't be
    > handled by the model. :-)
    >
    > /dev/mrg
    >
    >
    > > From: Holger Hoffstätte <holge..izards.de>
    > > Reply-To: <cayenne-use..bjectstyle.org>
    > > Date: Thu, 30 Jun 2005 16:25:22 +0200
    > > To: <cayenne-use..bjectstyle.org>
    > > Subject: Re: Sorting Relationships
    > >
    > > Kevin Menard wrote:
    > >> 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
    > >
    > > We talked about this several times but it's not yet implemented, mostly
    > > because it's actually a very far-reaching (and partially difficult) problem.
    > >
    > > -h
    >

    _________________________________________________________________________
    Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
    Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179



    This archive was generated by hypermail 2.0.0 : Fri Jul 01 2005 - 03:56:45 EDT