Has anyone used ember-data to model a tree of data?
I would assume it would be something like:
Node = DS.Model.extend({ children: DS.hasMany(Node),
This didn't work for me until I set up the inverse:
App.Node = DS.Model.extend({ children: DS.hasMany('App.Node', {inverse: 'parent'}), parent: DS.belongsTo('App.Node', {inverse: 'children'}) });