inherited mapping question

From: rdzeigl...arizona.edu
Date: Sun May 29 2005 - 00:27:10 EDT

  • Next message: Jürgen Saar: "Re: Relationships between DataMaps in the same DataDomain"

    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 - 00:27:12 EDT