Skip to content

Commit

Permalink
Better deprecation message in deserializeRecordId
Browse files Browse the repository at this point in the history
  • Loading branch information
joelalejandro committed Jun 10, 2015
1 parent bbbbb63 commit 45662c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ember-data/lib/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +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.");
Ember.deprecate("You tried to push a record '" + relationship.parentType + "'' with id '" + Ember.inspect(id) + "' and passed a DS.Model instance as a value for the relationship '" + key + "'. You should instead pass a numerical or string id to represent the record.");
data[key] = id._internalModel;
return;
}
Expand Down

0 comments on commit 45662c5

Please sign in to comment.