Re: filtering to-many relationship list

From: Stefaan Huysentruyt (cayenne.user..inimoa.net)
Date: Tue Oct 19 2004 - 03:03:37 EDT

  • Next message: Jürgen Saar: "Re: Re: filtering to-many relationship list"

    On 19-okt-04, at 03:50, Andrus Adamchik wrote:
    > Well, relationships are first-class citizens in the metadata part of
    > the framework. I don't think I'm ready to make them more explicit than
    > they are on the DataObject side ;-) From the user perspective
    > "relationship" property of an object should really be something simple
    > - a List, a Map, another DataObject. IMO Cayenne will loose a big part
    > of its usability otherwise.
    > Andrus
    >
    > On Oct 18, 2004, at 5:22 PM, Andriy Shapochka wrote:
    >> I think, the possible problem might be relationships are not treated
    >> as first-class citizens in the framework. If one introduces a concept
    >> of Relationships as explicit objects connecting DataObjects based on
    >> certain criteria then it immediately becomes strightforward
    >> Andriy.
    >>
    >> Andrus Adamchik wrote:
    >>> I was thinking about another approach - a relationship-level
    >>> qualifier
    >>> (like the one we now allow for entities)
    >>> Looking for good ways to merge the two...

    Indeed, from the users perspective, a relationship is just another
    property. That's why it is something simple, like a collection.

    But there is a little bell in the back of my head.

    It warns me that there is a possible risk we are unwillingly mixing the
    model of the framework with the model of our business. If a
    relationship is a qualifyable object, you could try to model it that
    way. The chances are it should be modeled that way. Or maybe take a
    step backwards and rethink that part of your model. Maybe your
    relationship target class needs an overhaul.
    Of course, if you need to keep some legacy "logical" datamodel
    unaltered, you must be creative too, I know.

    +--------+ +--------+
    | CL 1 |----------------| CL 2 |
    +--------+ (+ some kind +--------+
                   of filter)
    versus

    +--------+ +--------+
    | CL 1 |-----------------| CL 2 |
    +--------+ | +--------+
                  +---------+
                  | CL 3 |
                  +---------+
                 (+ qualifier)

    where CL 3 implements the first class relationship objects. It boils
    down to the fact these are just other objects.

    I hope I understood the problem.

    Stefaan



    This archive was generated by hypermail 2.0.0 : Tue Oct 19 2004 - 03:03:44 EDT