Re: Using SortedList for relationships ordering

From: Holger Hoffstätte (holge..izards.de)
Date: Fri Mar 21 2003 - 12:28:15 EST

  • Next message: Andrus Adamchik: "Re: Using SortedList for relationships ordering"

    Andrus Adamchik wrote:
    > Per your earlier message, SortedList is working pretty well:
    > http://objectstyle.org/cayenne/lists/cayenne-devel/2003/03/0010.html

    Thanks! It's not perfect but that's not something I can fix.
     
    > Do you think it is ready to be used for relationships sorting? If so, do
    > you think we can integrate it within the next few weeks, before Beta? I
    > assume adding this to the modeler shouldn't be a big deal either.

    I wrote it with that purpose in mind, although it is of course useful for
    general applications as well, instead of SortedSet. While the class itself
    works fine I'm not sure we should go for relationship ordering in beta-1.
    It's not really 'hard' but a lot of small things instead. Starting today I
    have basically zero time for Cayenne in the next few weeks, but will still
    try to write Configuration doc updates, a few more tests and get Entity
    renaming working in Modeler, but no promises.
    Of course if you want to go ahead, be my guest :-)
    Some ideas I had in mind:

    - default Ordering(s?) for an ObjEntity so that a simple fetch can be
    configured in Modeler to be sorted server-side or not

    - per-relationship Ordering(s?) since an object's preferred view on its
    children might be different than what the children have in mind on their
    own (must be settable: none (explicitly unordered), default (use Entity's
    preferred ordering), custom (select 1-n attributes)

    - what about class generation? Should the relationship explicitly return a
    SortedList or just List, to not 'pollute' client classes? I don't think
    explicitly using SortedList (the interface) is a big deal and better (less
    surprises) but opinions on this might vary.

    - kill Ordering.orderList (both) and checkObjectsClass() :-)

    any other ideas?

    Holger



    This archive was generated by hypermail 2.0.0 : Fri Mar 21 2003 - 12:32:30 EST