Skip to content

Commit

Permalink
avoid unnecessary singularization for belongsTo relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Stuart committed Jun 3, 2015
1 parent 405f9c5 commit bcefa52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ember-data/lib/system/relationship-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export function typeForRelationshipMeta(meta) {
var modelName;

modelName = meta.type || meta.key;
return singularize(normalizeModelName(modelName));
if (meta.kind === 'hasMany') {
modelName = singularize(normalizeModelName(modelName));
}
return modelName;
}

export function relationshipFromMeta(meta) {
Expand Down

0 comments on commit bcefa52

Please sign in to comment.