Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractId called after extractAttributes #47

Open
makepanic opened this issue Feb 8, 2017 · 0 comments
Open

extractId called after extractAttributes #47

makepanic opened this issue Feb 8, 2017 · 0 comments

Comments

@makepanic
Copy link
Contributor

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)
makepanic added a commit to makepanic/ember-data-hal-9000 that referenced this issue Feb 14, 2017
makepanic added a commit to makepanic/ember-data-hal-9000 that referenced this issue Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant