You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
changedAttributes return entire deep object instead of only the changed field #74
After updating a sub-set of nested properties, calling model.changedAttributes will return the entire object instead of only the changed ones.
var book = new Backbone.NestedModel.model({
title: 'abook',
author: {
first_name: 'Jane',
last_name: 'Doe'
},
category: 'Mistery'
});
book.save();
...
book.set({
title: 'TheBook',
author: {
first_name: 'Jhon'
}
});
console.log(book.changedAttributes());
/* printed result is
{
title: 'TheBook',
author: {
first_name: 'Jhon',
last_name: 'Doe'
}
}
*/
Would it be possible to just return the changedAttributes?
Hi there,
After updating a sub-set of nested properties, calling model.changedAttributes will return the entire object instead of only the changed ones.