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

Meta-data is not reflected on a saved model (ED 2.3, ED 2.4) #4115

Closed
duizendnegen opened this issue Jan 26, 2016 · 3 comments
Closed

Meta-data is not reflected on a saved model (ED 2.3, ED 2.4) #4115

duizendnegen opened this issue Jan 26, 2016 · 3 comments

Comments

@duizendnegen
Copy link

Calling save on a model (this is a PUT operation in this case) doesn't capture the metadata that is returned from the server. Incidentally, this is also true for queryRecord. (Perhaps related: #3918)

payment.save().then((result) => {
   console.log(this.get('payment.meta'));
});

prints undefined.

Using the private method _metadataFor gives the metadata as expected

payment.save().then((result) => {
   console.log(this.get('store')._metadataFor('payment'));
});

prints

{
   error: "Failed charging the card"
}
@bmac
Copy link
Member

bmac commented Feb 4, 2016

I believe it is a known issue that meta is not supported on records. See: #2905

@wecc do you mind writing up what needs to happen to allow for meta support on records?

@duizendnegen
Copy link
Author

Any update @wecc @bmac, especially considering the workaround doesn't work with 2.4.x anymore?

@duizendnegen duizendnegen changed the title Meta-data is not reflected on a saved model (ED 2.3) Meta-data is not reflected on a saved model (ED 2.3, ED 2.4) Mar 24, 2016
@pangratz pangratz added the meta label May 27, 2016
@wecc
Copy link
Contributor

wecc commented Oct 21, 2016

@duizendnegen There's an RFC from @pangratz at emberjs/rfcs#160 that aims to lay the groundwork for supporting meta and links.

I'm closing this issue since we're tracking JSON API support (including meta for single records) in #2905, feel free to join the discussion there.

@wecc wecc closed this as completed Oct 21, 2016
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

4 participants