Lionel Schwarz created SYNCOPE-1703:
---------------------------------------
Summary: 409-EntityExists for relationships on PATCH
/anyObjects/KEY
Key: SYNCOPE-1703
URL: https://issues.apache.org/jira/browse/SYNCOPE-1703
Project: Syncope
Issue Type: Bug
Components: core
Affects Versions: 3.0.0-M1
Reporter: Lionel Schwarz
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)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)