[OS-JIRA] Created: (CAY-324) Refactoring of object hierarchies causes relationship problems

From: jira-norepl..bjectstyle.org
Date: Wed Jun 08 2005 - 01:40:17 EDT

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-325) Clicking Project Validation errors no longer brings up the offending object"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-324

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-324
        Summary: Refactoring of object hierarchies causes relationship problems
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 CayenneModeler GUI
       Versions:
                 1.2 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Robert Zeigler

        Created: Wed, 8 Jun 2005 1:39 AM
        Updated: Wed, 8 Jun 2005 1:39 AM
    Environment: Debian Sid Linux, java 1.4.2_01

    Description:
    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.

    Another way:
    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.

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Wed Jun 08 2005 - 01:40:18 EDT