Skip to content

extractId called after extractAttributes #47

@makepanic

Description

@makepanic

extractAttributes deletes keys from the payload object.
This means when calling extractId, the developer can only read the updated object.

The call order could be changed to allow extractId to use the full incoming object.
Datas json-api serializer does it like this:

      id:            this.extractId(modelClass, resourceHash),
      type:          this._extractType(modelClass, resourceHash),
      attributes:    this.extractAttributes(modelClass, resourceHash),
      relationships: this.extractRelationships(modelClass, resourceHash)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions