I am not sure I have the exact terminology here, but does ember data support something like a one way relationship between models. I would describe it as either:
one to none
or one to many
But only bound in one direction, so trying to understand the implications for the identity map.
Imagine the following models
App.Thing = DS.Model.extend({
name: DS.attr(),
other: DS.belongsTo('other')
});
App.Other = DS.Model.extend({
foo: DS.attr(),
bar: DS.attr(),
baz: DS.attr(),
});
Note how Other
doesn’t has any explicit link back to Thing
Is this legal and can you do stuff like this?
{{ thing.other.foo }}
{{ thing.other.bar }}
{{ thing.other.baz }}
In my design the inverse doesn’t make sense
{{ other.thing }}
If this possible in ember-data without causing serious problems?