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

[REGRESSION release] Make meta available with new Serializer API #3398

Merged
merged 1 commit into from
Jun 20, 2015

Conversation

wecc
Copy link
Contributor

@wecc wecc commented Jun 20, 2015

We forgot to deprecate store.metadataFor and store.setMetadataFor when releasing 1.13. We also failed to keep backwards compatibility with metadata for users that are preparing for 2.0 and switches over to the new Serializer API.

This PR fixes that regression and correctly deprecates store.metadataFor and store.setMetadataFor.

Fixes #3391

*/
metadataFor: function(modelName) {
Ember.deprecate("`store.metadataFor()` has been deprecated. You can use `.get('meta')` on relationships and arrays returned from `store.query()`.");
return this._metadataFor(...arguments);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can just do modelName

igorT added a commit that referenced this pull request Jun 20, 2015
[REGRESSION release] Make meta available with new Serializer API
@igorT igorT merged commit 7a54a2d into emberjs:master Jun 20, 2015
@KTKate
Copy link

KTKate commented Jun 22, 2015

if it's being deprecated, what's the new way?

@wecc
Copy link
Contributor Author

wecc commented Jun 22, 2015

@JKGisMe You can get meta off of relationships plus arrays returned from query by doing .get('meta') (when this has been released).

@kottenator
Copy link

What about "meta" on the top level (not inside relationships)? What is the correct replacement of this.store.metadataFor('smth')?

I've provided the full example/question in another ticket

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

Successfully merging this pull request may close these issues.

Metadata lost in RESTAdapter with isNewSerializerAPI
4 participants