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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -