ITADN

Modifying relationship not working using a PUT call

#1774Openmuazzam0x48 创建于 2025-05-21
M
muazzam0x48commented
### Problem The user should be able to modify a between relationship using a PUT call. ### Reproducing Consider these entities and relationship: ``` (entity :Resource {:Id :Identity :FullName :String}) (entity :Team {:Id :Identity :Name {:type :String :unique true}}) (relationship :TeamResource {:meta {:between [:Team :Resource] :one-many true}}) ``` If the user wants to change the Team of a particular Resource, something like this should work: ``` PUT /api/ResourceAllocation.Core/TeamResource { "ResourceAllocation.Core/TeamResource": { "Resource": "{{resourcepath}}}", "Team": "{{teampath}}" ; changed value } } ``` Or using more standard PUT interface: ``` PUT /api/ResourceAllocation.Core/TeamResource/{{relationshipid}} { "ResourceAllocation.Core/TeamResource": { "Team": "{{teampath}}" } } ``` Or this: ``` PUT /api/ResourceAllocation.Core/Resource/{{resource}}/TeamResource/Team { "ResourceAllocation.Core/Team": { "__path__": "{{teampath}}" } } ``` However, none of these solutions are working.
0 条评论