Fwd: Flattened relationships

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Feb 24 2004 - 22:56:19 EST

  • Next message: Nenko Ivanov: "Using Cayenne and Firebird embeded JDBC driver"

    Oops, forgot to forward this to the list...

    Begin forwarded message:
    > From: Andrus Adamchik <andru..bjectstyle.org>
    > Date: February 24, 2004 10:52:23 PM EST
    > To: Jorge Sopena <jsopen..idsa.es>
    > Subject: Re: Flattened relationships
    >
    > Hi Jorge,
    >
    > My approach in this situation (join table with meaningful
    > attribute(s)) would be to model the join table as a real object and
    > use "simple" relationships instead of flattened. This does make it it
    > harder to navigate between Company and Telecom, but this can be solved
    > by manually creating utility getter methods on either side.
    >
    > Andrus
    >
    >
    > On Feb 24, 2004, at 5:20 AM, Jorge Sopena wrote:
    >> Hi,
    >>
    >> I'm having problems in the way to represent a many to many
    >> relationship. In my DB model I 've got a relation many to many
    >> between Company and Telecom.
    >> In the DB scjhema, I've got a join table CompanyTelecom with the two
    >> PK as FK, and an attribute about the MSC (message system center).
    >> I mean a Company can work with tomany Telecom, and each Telecom can
    >> work with tomany Company, but in each relationship the MSC may be
    >> different, so
    >> this attribute is in the Join table ComapnyTelecom.
    >> My problem is how to recover this attribute (MSC) if I create a
    >> flattened relationship between Company and Telecom in the object
    >> model, and I eliminate the object CompanyTelecom.
    >>
    >> What should it be the best way to do it?
    >>
    >> Thanks,
    >>
    >> Jorge



    This archive was generated by hypermail 2.0.0 : Tue Feb 24 2004 - 22:56:26 EST