Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-1703

409-EntityExists for relationships on PATCH /anyObjects/KEY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 3.0.0-M1
    • None
    • core
    • None

    Description

      Patching (ADD_REPLACE) an anyObject with a relationships that already exists returns 409 

      GET /anyObjects/ccsd

      {{{}

      { "_class": "org.apache.syncope.common.lib.to.AnyObjectTO", "key": "c8fa2d14-3362-4b18-ba2d-143362db1894", "type": "COLLABORATION", "name": "ccsd", "relationships": [ \{ "type": "RELATION_COLLABORATION_DOMAINE", "otherEndType": "DOMAINE_SCIENTIFIQUE", "otherEndKey": "509678c4-c32b-49e5-9678-c4c32bd9e5e3", "otherEndName": "Pluri-valorisation" }

      ]}{}}}{}

      {{PATCH /anyObjects/c8fa2d14-3362-4b18-ba2d-143362db1894 -d '{ "_class": "org.apache.syncope.common.lib.request.AnyObjectUR", "key": "c8fa2d14-3362-4b18-ba2d-143362db1894", "relationships": [ { "operation": "ADD_REPLACE", "relationshipTO":

      { "type": "RELATION_COLLABORATION_DOMAINE", "otherEndType": "DOMAINE_SCIENTIFIQUE", "otherEndKey": "509678c4-c32b-49e5-9678-c4c32bd9e5e3", "otherEndName": "Pluri-valorisation" }

      } ] } '}}

      {{

      { "status": 409, "type": "EntityExists", "elements": [ "A violation of the constraint imposed by a unique index or a unique constraint occurred" ] }

      }}

       

      I'm not sure if this is a bug or a feature, but I feel like ADD_REPLACE should behave like for plain attributes or resources (return 200 even if same value)

      Attachments

        Activity

          People

            Unassigned Unassigned
            lschwarz Lionel Schwarz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: