Affects Version/s: 1.2 branch
Fix Version/s: None
Environment:Debian Sid Linux, java 1.4.2_01
When performing refactoring of object hierarchies in the modeling, problems with inherited relationships can arise where the child object and the parent object both define the relationships (in the mapping xml file), even though it looks like the child is correctly inheriting the relationship in the modeler.
Scenarios where this behavior has been observed:
Create a "base" object from a table and synchronize with the database.
Now select the database entity and click on the "create object entity" button; the modeler will automatically select the table, etc. for you, synchronized with the database.
This second object should extend the first object, so change the inheritence to reflect this. Save the project and look at the mapping; all of the relationships and attributes will be defined twice, once in the base and once in the sub class. Expected: since all of the attributes and relationships in the class are inherited, the subclass shouldn't redefine them; since they were already defined in the object before making it the subcass of the first object, the inherited subclass attributes and relationships should be deleted.
Create the base class (A). Don't synch; it's an empty object.
Create a subclass (B) and synchronize the object. The attributes and relationships are correctly added.
Now go back and synchronize A with the database. The attributes and relationships are, once again, correctly added. But, if you look back at B, it appears as though all of the attributes and relationships are being inherited from A, when, in fact, the map will show them defined both places. When the base class adds a property or relationship that exists in a subclass, as long as the properties or relationships are exactly the same, the subclass property/relationship should be removed in the graph.