LocalStorage Data Adapter und hasMany Relationship in emberjs
In meiner Anwendung verwende ichLSA und ich muss Relation in meinem Modell verwenden, zum Beispiel habe ich Post- und Kommentar-Modelle wie dieses:
App.Post = DS.Model.extend({
title:DS.attr('string'),
comments:DS.hasMany('comments')
});
App.Comments=DS.Model.extend({
content:DS.attr('string'),
post:DS.belongsTo('post')
});
Ich möchte wissen, wie man eine untergeordnete Beziehung zwischen Post und Kommentaren herstellt und wie man Commnets von Post aktualisiert.