The hook currently clears duplicated records from the included collection, but as this SO post says, data can have a record which is also present in included because it is part of a self-referenced relationship.
I'm awaiting further oppinions about this to see what should the post-serialization process should do in this case.
- Discussed it on Ember's Slack channel, shouldn't cause any troubles on Ember Data. Possibly the JSON API spec maintainers haven't ruled on this case.
The hook currently clears duplicated records from the
includedcollection, but as this SO post says,datacan have a record which is also present inincludedbecause it is part of a self-referenced relationship.I'm awaiting further oppinions about this to see what should the post-serialization process should do in this case.