Re: Flattened relationship support

From: Andrus (andru..bjectstyle.org)
Date: Thu Oct 17 2002 - 23:32:25 EDT

  • Next message: Andrus: "DataContext refactoring"

    At 04:22 PM 10/18/2002 +1300, Craig Miskell wrote:
    >Hi,
    > I'm beginning to implement this, and have a question. In
    > EOModelProcessor,
    >it sets the cardinality of a flattened relationship to be toMany if the first
    >dbRel is toMany. What I'm wondering is if a flattened relationship that had
    >a toOne followed by toMany would work (at all). If so, should not not then
    >be toMany iff at least one of the constituent relationships is toMany?
    >
    >Or is a toOne->toMany not valid? I can't see why it wouldn't myself, but
    >that doesn't mean I'm not missing something critical,

    I think you are right, and we should go with suggested algorithm. Here is
    an example:

    Manager -> (1) Department -> (many) Empolyee

    would give a flattened to-many relationship of "Manager.employeeArray"

    (Though Manager is also an Employee, and this makes this circular, I can't
    think of a better example).

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Oct 17 2002 - 23:31:58 EDT