This repository was archived by the owner on Apr 22, 2021. It is now read-only.

Description
Maybe I'm missing something, but currently there doesn't seem to be a clean way to do the following for a has-one relationship:
- Listen for the change of a related model
- In the event handler for the change, access the new value.
For example, assume Foo has-one Bar. You can listen for a change in Foo's Bar property using foo.on('change:bar_id', handler). But in the handler, you can't currently use foo.bar() to access the new property. This is because in One.replace, the code is:
model.set(this.id, other.id);
model[this.store] = other;
So the change gets triggered before the child model gets stored back on the parent.
Is this by design? A bug? Is there another way to accomplish this?