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

Deprecation if id is Model in deserializeRecordId #3279

Merged
merged 2 commits into from
Jun 14, 2015

Conversation

joelalejandro
Copy link
Contributor

Fixes #3271

@@ -2058,6 +2058,7 @@ function deserializeRecordId(store, data, key, relationship, id) {

//If record objects were given to push directly, uncommon, not sure whether we should actually support
if (id instanceof Model) {
Ember.deprecate("Passing a record object to push directly into the store has been deprecated. Pass a number or string as a value to represent the record.");
Copy link
Member

Choose a reason for hiding this comment

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

Can you make the deprecation message a bit more descriptive to the user. Think about if you were to see it pop up in the console. Something with more context like:
You tried pushing a record 'recordType' with id 'id' and passed a DS.Model as a value for the relationship 'relationshipKey' etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll change it in a bit.

@igorT
Copy link
Member

igorT commented Jun 10, 2015

thanks!

@bmac
Copy link
Member

bmac commented Jun 10, 2015

👍

@igorT
Copy link
Member

igorT commented Jun 11, 2015

@joelalejandro Can you add a test for this please

@joelalejandro
Copy link
Contributor Author

@igorT sure, I'll get to it.

@igorT igorT mentioned this pull request Jun 13, 2015
13 tasks
igorT added a commit that referenced this pull request Jun 14, 2015
Deprecation if id is Model in deserializeRecordId
@igorT igorT merged commit c4376c0 into emberjs:master Jun 14, 2015
@igorT
Copy link
Member

igorT commented Jun 14, 2015

We already did it, thanks though!

@joelalejandro
Copy link
Contributor Author

Great @igorT, was out of town during the weekend ^^'

@joelalejandro joelalejandro deleted the pr-issue-3271 branch June 15, 2015 01:52
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.

3 participants