Re: inherited mapping question

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun May 29 2005 - 12:08:19 EDT

  • Next message: Mike Kienenberger: "Re: Relationships between DataMaps in the same DataDomain"

    If a relationship is inherited using Modeler inheritance feature, then
    you shouldn't map it in a subclass. Not sure if there is an issue with
    the modeler that allowed you to create it in the first place, but you
    should probably remove the subclass mapping for this relationship.

    Andrus

    On May 29, 2005, at 12:27 AM, rdzeigl...arizona.edu wrote:

    > Am I correct in understanding that if object b extends object a, and
    > object a
    > defines a mapping to object object c, then there should /not/ be an
    > obj-relationship mapping in the map.xml file for object b to object c,
    > right?
    >
    > Put in a more concrete example (pseudo-code and pseudo-xml follows
    > :)...
    >
    > class _vehicle {
    >
    > public List getOilChangeList() {
    > ....
    > }
    > }
    >
    > class _car extends vehicle {
    > //inherits getOilChangeList...
    > }
    >
    > then, in the map.xml file, there should be a /single/ obj-relationship
    > tag,
    > <obj-relationship name="oilChangeList" source="vehicle" target="..."
    > db-relationship="..."/>
    >
    > Right? There should NOT be a second mapping, like...
    > <obj-relationship name="oilChangeList" source="car" target="..."
    > db-relationship="..."/>
    > Correct?
    >
    > I ask because today, in doing a bunch of refactoring, I suddenly ran
    > into issues
    > where one to many relationships were borked. Looking at the .xml file,
    > and
    > comparing it with the map.xml file of another mapping wherein the
    > one-to-many
    > relationships work fine revealed only that difference. So... :)
    > Thanks!
    >
    > Robert



    This archive was generated by hypermail 2.0.0 : Sun May 29 2005 - 12:08:21 EDT