REST API update associations

cancel
Showing results for 
Search instead for 
Did you mean: 
soloff
Member II

REST API update associations

I ran into a problem: I have mandatory=true and many=false association. This is very common thing! How can I update it?

I can't delete it (and then add new) by DELETE http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/a5683447-7f4b-4924-af8a-021598f72708/targets/f5e9e246-bb59-45dd-a6ec-167aa084bbb3

Error:
09090169 Found 1 integrity violations:\nThe association target multiplicity has been violated: \n Source Node: workspace://SpacesStore/a5683447-7f4b-4924-af8a-021598f72708\n Association: Association[ class=ClassDef[name={http://www.test.company.com/model/content/1.0}test], name={http://www.test.company.com/model/content/1.0}testAssoc, target class={http://www.alfresco.org/model/content/1.0}person, source role=null, target role=null]\n Required target Multiplicity: 1..1\n Actual target Multiplicity: 0"

I can't add new (and then delete old) by POST http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/a5683447-7f4b-4924-af8a-021598f72708/targets

Error:
"09090166 Node association already exists from a5683447-7f4b-4924-af8a-021598f72708 to f5e9e246-bb59-45dd-a6ec-167aa084bbb3"

Is this deadlock? If yes, then this REST API is absolutely not suitable