jupiterjs/jquerymx — pull request #82 by marnusw (2011-10-19 12:59:01+00:00)
Title: Fixed $.Model.restore(true) overwriting associated (nested) models with plain objects

Currently when backup/restore is used to restore a model with the _restoreAssociations_ option the nested model is lost because it is overwritten by the plain object from the store. I propose checking whether the current property is a nested model and in that case setting its values with its own `attrs()` method. This preserves the nested model and also causes it to trigger the appropriate update events etc.

#### Two things though:
- I'm not sure whether it's OK to return early after setting the nested model values, but it seems to me that the nested model will handle everything that's necessary.
- There may be a better way to test whether a property is a nested model.