I am trying to model the scenario below.
import DS from 'ember-data';
Type2 = DS.Model.extend({
value1: DS.attr('boolean'),
value2: DS.attr('boolean'),
value3: DS.attr('boolean')
});
Type1 = DS.Model.extend({
field1: DS.belongsTo('Type2'),
field2: DS.belongsTo('Type2')
});
- In the model above it seems like the the parent -
Type1
- does not get updated when I change a field in any of child -Type2
- objects. - What structure will the Json that is returned from the server have to be?
- The documentation needs to be more descriptive because relationships are very common. Otherwise, the framework is nice. Good job.
Thanks,
Aucun commentaire:
Enregistrer un commentaire