-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
@@ -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."); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
thanks! |
👍 |
@joelalejandro Can you add a test for this please |
@igorT sure, I'll get to it. |
Deprecation if id is Model in deserializeRecordId
We already did it, thanks though! |
Great @igorT, was out of town during the weekend ^^' |
Fixes #3271