File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,12 @@ relationship URLs.
291
291
If present, a * related resource URL* ** MUST** be a valid URL, even if the
292
292
relationship isn't currently associated with any target resources.
293
293
294
+ > Note: The spec does not impart meaning to order of resource identifier
295
+ objects in linkage arrays of to-many relationships, although implementations
296
+ may do that. Arrays of resource identifier objects may represent ordered
297
+ or unordered relationships, and both types can be mixed in one response
298
+ object.
299
+
294
300
For example, the following article is associated with an ` author ` :
295
301
296
302
``` javascript
@@ -1510,9 +1516,9 @@ Accept: application/vnd.api+json
1510
1516
```
1511
1517
1512
1518
If a client makes a ` POST ` request to a * relationship URL* , the server
1513
- ** MUST** append the specified members to the relationship using set
1514
- semantics. This means that if a given ` type ` and ` id ` is already in the
1515
- relationship, the server ** MUST NOT** add it again.
1519
+ ** MUST** add the specified members to the relationship unless they are
1520
+ already present. If a given ` type ` and ` id ` is already in the relationship,
1521
+ the server ** MUST NOT** add it again.
1516
1522
1517
1523
> Note: This matches the semantics of databases that use foreign keys for
1518
1524
has-many relationships. Document-based storage should check the has-many
You can’t perform that action at this time.
0 commit comments