Skip to content

Backbone Associations v0.5.2

Choose a tag to compare

@dhruvaray dhruvaray released this 02 Sep 05:52
· 123 commits to master since this release
  • Bug fix : Nested collections re-use references.
  • Bug fix : Propagate user defined options for nested-change events.
  • Bug fix : In a cycle scenario, a call to toJSON inside an event handler would not create the right JSON.
  • Increase error handling so that users will not trip up when they mis-type or enter wrong values during relation defintions.
  • The map function is now called with a specific AssociatedModel instance (as context). It takes in an additional paramter - which specifies the type of the relatedModel or Collection type. Could be useful in scnearios when you want to generalize the map function across relation types. See this recipe.
  • For cycle scenarios, the toJSON method serializes with {id:value} when it detects a cycle. This is a good default. Users can over-ride if necessary. See this recipe.