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

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

jQuery Ajax Render Fragments OR Whole Page -

java - Why is BlockingQueue.take() not releasing the thread? -