ember-data-model-fragments
ember-data-model-fragments copied to clipboard
Question about modification merges
Less of an issue and more of a question.
Standard ED model behaviour looks like this:
const foo = Model.extend({
foo: attr(),
bar: attr()
});
// say foo and bar have changed on the server
foo.set('foo', 'qux');
foo.reload();
// I will only get the remote change to bar as foo is locally dirty
Given a case using fragments:
const frag = Fagment.extend({
foo: attr(),
bar: attr()
});
const foo = Model.extend({
baz: fragment('frag')
});
// say foo and bar have changed on the server
foo.set('baz.bar', 'qux');
foo.reload();
// I will get no changes from the fragment and my local copy will be preserved
Is this expected behavior?