I have two model with a one to one relation. I only need one direction of the relationship.
App.A = DS.Model.extend({
b: DS.belongsTo('b', { async: true }),
});
App.B = DS.Model.extend({
name: DS.attr('string'),
});
Model A is load from the server. Model B is manually pushed using store.pushPayload
.
If Model B is loaded before Model A, everything is fine and works correctly inside the template. But when Model A is loaded before Model B, then the name is empty (the whole relation is not set actually).
How can I tell model A that model B was loaded?
Aucun commentaire:
Enregistrer un commentaire