This example demonstrates how to incrementally load and save object graphs. This is important because
rarely, there would be a need to fetch (or save) a entire object hierarchy from the server.
This example demonstrates how to setup explicit reverse associations between two AssociatedModels.
Association Cycles (AMD)
This example demonstrates how to setup explicit reverse associations between two AssociatedModels in an AMD environment like require.js.
Using Backbone-Associations as an AMD module
Use a reference store - I
Use a local reference store to transform type (or id) info to AssociatedModel's
Use a reference store - II
In v0.5.2+, the map API is augmented to pass in a type parameter. The type parameter contains the target model (or collection) type which the passed-in id (or ids) will get eventually transformed to. Additionally, the map function is invoked with the specific model instance as context. (versus a global function in v0.5.1)
Simulate Polymorphic associations with Backbone Associations.
Uses Backbone Associations v0.5.1+
Polymorphic Models in 1:M relations
Use polymorphic models in 1:M relations v0.5.4+
Demonstrates how a grandparent can listen in to changes in a (nested) collection
In this example, an Account (Grand-parent) is notified of changes in the shopping cart (grand-children)
Pass options to a relation
This example demonstrate how to leverage options passed in to a relation definition.
A utility method to convert any type (Associated Model, Collection or even primitive types) into a json
representation. Handle cycles too.
Please create an issue in issue
tracking system mentioning your gist url. Interesting contributions will find an entry on this page.