backbone.js - What's the best way to reset deeply nested collections? -
i have following data structure:
one modela has nested collection of modelbs.
each modelb has nested collection of modelcs
by overriding modela's parse method, can bootstrap attributes modela , populate nested collection of modelbs :
assuming server sends { modela_attributes: { ... }, arrayofb_attributes: [{..}, {..}, ..]} can in parse method: modela.nestedbs.reset arrayofb_attributes , return modela_atrributes
the problem how can reset attributes of modelcs each modelb ?
have considered using backbone-relational? it'll handle of these. found race condition doing kind of stuff few weeks ago, looks paul's fixed it.
Comments
Post a Comment