From e9c347adb9472c3a116f5bea7bf560325cce79ed Mon Sep 17 00:00:00 2001 From: Allen Hsu Date: Fri, 29 Jan 2016 16:56:57 +1100 Subject: [PATCH] Fix calls to keyForRelationship in embedded records --- addon/-private/serializers/embedded-records-mixin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/-private/serializers/embedded-records-mixin.js b/addon/-private/serializers/embedded-records-mixin.js index 2d231921ad6..451a80041c2 100644 --- a/addon/-private/serializers/embedded-records-mixin.js +++ b/addon/-private/serializers/embedded-records-mixin.js @@ -217,7 +217,7 @@ export default Ember.Mixin.create({ _serializeEmbeddedBelongsTo(snapshot, json, relationship) { let embeddedSnapshot = snapshot.belongsTo(relationship.key); - let serializedKey = this.keyForRelationship(relationship.key, 'serialize'); + let serializedKey = this.keyForRelationship(relationship.key, relationship.kind, 'serialize'); if (!embeddedSnapshot) { json[serializedKey] = null; } else { @@ -332,7 +332,7 @@ export default Ember.Mixin.create({ }, _serializeEmbeddedHasMany(snapshot, json, relationship) { - let serializedKey = this.keyForRelationship(relationship.key, 'serialize'); + let serializedKey = this.keyForRelationship(relationship.key, relationship.kind, 'serialize'); warn( `The embedded relationship '${serializedKey}' is undefined for '${snapshot.modelName}' with id '${snapshot.id}'. Please include it in your original payload.`,