Skip to content

included parameter potentially includes the object itself #524

Closed
@hb9hnt

Description

@hb9hnt

Let's say we have a class Room and a class Person with a foreign key to Room. Now I want to create a new person in the room and reload all the people already in the room because adding the person might have changed them for some reason. Therefor I send a POST request containing the new person to

persons/?include=room.persons`

This lead to the newly created person to be included twice, once in the data property of the reply and once in the included property. Even though this isn't explicitly forbidden by jsonapi.org, Ember doesn't like this. IMHO an object shouldn't be included twice in a reply - meaning that this should be fixed on the DJA side of things.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions