-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
If there are relationships that share resources, and are included only once each (see the example below - there are only two books but one is both a "selling" and a "favorite") when they are deserialized the second instance of the repeated relationship is not properly included (it just places null)
{
"data": {
"type": "user",
"id": "5ad2601522c6f6733408ae1f",
"attributes": {...},
"relationships": {
"favorite": {
"data": [
{
"type": "book",
"id": "5aca58621d13177065279691"
}
]
},
"selling": {
"data": [
{
"type": "book",
"id": "5ac8dd784f904b5a281aa061"
},
{
"type": "book",
"id": "5aca58621d13177065279691"
}
]
}
}
},
"included": [
{
"type": "book",
"id": "5aca58621d13177065279691",
"attributes": {...},
},
{
"type": "book",
"id": "5ac8dd784f904b5a281aa061",
"attributes": {...}
}
]
}
When deserialized, this returns
{
...
"id": "5ad2601522c6f6733408ae1f",
"selling": [
{
...
"id": "5ac8dd784f904b5a281aa061"
},
null <-- Relationship was included but presumably used up for something else!
],
"favorite": [
{
...
"id": "5aca58621d13177065279691"
}
]
}
shupac, sreecodeslayer, avdeev, ajmathews and copet80copet80
Metadata
Metadata
Assignees
Labels
No labels