{"version":"1.0","type":"rich","title":"wondering about top-level persistence of a netsted object in backbone","description":"This example demonstrates a nested Backbone.js data model where a `Text` model contains a `SentenceCollection`, while the top-level `TextCollection` persists to `localStorage` via `Backbone.LocalStorage`. The code shows `Text` initializing its own `SentenceCollection` in the model’s `initialize` method, but leaves `Sentence` and `SentenceCollection` without any persistence layer, prompting a question about whether to override `Sentence.save` to hand data upward. It uses Backbone’s `Model.extend` and `Collection.extend` to define the hierarchy, illustrating the challenge of persisting nested collections through a single top-level store.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-3808753?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}