Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-3546

isOptional for composition relationship category?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • atlas-core
    • None

    Description

      I noticed since ATLAS-3051, the relationship attribute must be specified in the end def which is not container and relationship category is composition. 

      I understand it's to prohibit orphan children but is it too strong? Reason below:

      1. I have to provide all the entities along the relationship path in the payload when creating a child, eg, for RDBMS, I have to provide rdbms_instance, rdbms_db, rdbms_table, rdbms_column where I just want to create a single rdbms_column, it brings performance overhead to check existence of rdbms_instance, rdbms_db, etc..., 
      2. I have defined a composition relationship type where each end is the same entity type, it couldn't be created successfully anymore since it always requires the mandatory attribute where it's the same type and then falls into infinite loop.

      Three possible fixes:

      1. Remove the isOptional constraint, since ownedRef/inverseRef doesn't have such constraint.
      2. Add isOptional to relationship type end def.
      3. Add option in Rest to ignore the isOptional constraint for relationship type.

      Attachments

        1. xml.jpg
          21 kB
          Charles Shen
        2. xml.jpg
          20 kB
          Charles Shen
        3. json.jpg
          22 kB
          Charles Shen

        Activity

          People

            Unassigned Unassigned
            api123 Charles Shen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: