lundi 27 juillet 2015

Is there a way to specify which variable to use in ember relationship

After specifying the relationship between

App.Post = DS.Model.extend({
  comments: DS.hasMany('comment')
});

App.Comment = DS.Model.extend({
  post: DS.belongsTo('post')
});

But what it does is it accepts integer id in 'post' and an array of integers in 'comments' can anyone please tell me how to use any other variable for the reference like name or title instead of array.




Aucun commentaire:

Enregistrer un commentaire