You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "Francesco Chicchiriccò (Jira)" <ji...@apache.org> on 2022/10/25 08:24:00 UTC
[jira] [Closed] (SYNCOPE-1703) 409-EntityExists for relationships on PATCH /anyObjects/KEY
[ https://issues.apache.org/jira/browse/SYNCOPE-1703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò closed SYNCOPE-1703.
-------------------------------------------
Resolution: Invalid
This is on purpose.
Please check in mailing list before opening issues, thanks.
> 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
> Priority: Minor
>
> 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)