Skip to content
Ean Schuessler edited this page Jun 17, 2014 · 2 revisions

Backbone Nested Models

This library allows you to nest Backbone models inside one and another and will walk down the hierarchy of models.

If you want values from model A to be merged into model B then you should set merge:true in a set.

modelB.set(modelA, {merge: true});

if modelA is POJO and you want POJO objects to be mapped into child Backbone.Models then you should also set parse: true.

modelB.set(modelA, {merge:true, parse:true});

Clone this wiki locally