Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-144

Need to provide a better naming scheme for relationships

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • Java-SCA-M2
    • Java DAS RDB
    • None

    Description

      The current naming scheme allows users to specify a "relationship name" in the relationship defintion section of the config file. Users tend to name this in terms of their view of the relationship. For example, if I am trying to describe a relationship between Company and EmployeeOfTheMonth then I might logically name the relationship Company->EOM. Then I would expect to be able to use the dynamic SDO apis to traverse this relationship like this:

      DataObject empOfTheMonth = aCompany.getDataObject("Company->EOM")

      Currently, the situation is such that the name really applies to the path on the relationship from the "parent" to the "child". That is , the name refers to the direction from the parent row (row holding the PK) to the child (row holding the FK). The DAS then generates a name for the other side of the relationship by taking "name" and adding "_opposite".

      The reult for the example above is that the name for the side of the relationship from Company to Employee of the month is actually "Company->EOM_opposite" which is very confusing.

      The current convention works well for mostof the time but we may want to allow the user to name both sides of the relationship and provide documentaiton about what is actually being named.

      OneToOneRelationshipTests.test3 illustrates this issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwilliams Kevin Joe Williams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: