Skip to content

Releases: dhruvaray/backbone-associations

Backbone-Associations : v0.6.2

29 Jun 01:24
Compare
Choose a tag to compare
  • Introducing collectionOptions - Can be an options hash or a function which returns an options hash. These options will be utilized while instantiating a new collection of type collectionType
  • Allow leaf nodes of the object graph to be simple Backbone.Model(s) as well.
  • Set parents property eagerly, so that it is available in the children initialize at the time of graph creation.
  • Bug fix : Remove references from parents during re-assignment and model destroy operations (Issue #111 & #114)
  • Bug fix : Check for existence (rather than value) for idAttribute (Issue #112)
  • Bug fix : Check for null/undefined v/s legitimate false value scenarios (Issue #137)
  • Bug fix : Checks for maps returning null values (Issue #133)

Backbone-Associations v0.6.1

23 Feb 06:17
Compare
Choose a tag to compare
  • Bug fix : Add underscore as explicit dependency for BB-Associations in the node.js environment.
  • Compatible with Backbone.js v1.1.2.

Backbone-Associations v0.6.0

19 Feb 06:00
Compare
Choose a tag to compare
  • Significantly improve event bubbling performance. Only bubble events if objects are listening to those event paths.
  • BREAKING CHANGE : nested-change events are not fired by default. To switch them on set Backbone.Associations.EVENTS_NC = true at any point in your application flow.
  • collectionType can be a function as well. This makes the API of relatedModel and collectionType uniform.
  • Added support for specifying global scopes. When relatedModel and collectionType are specified as strings, the global scopes will also be searched for locating the model definition.
  • Additional attribute - scope - can now be specified while defining a relation. Use to it define the scope of relatedModel and collectionType string.
  • Additional attribute - serialize - can now be specified while defining a relation. Use this attribute to set an array of attributes (singleton or subset) which will be serialized to the server end-point.
  • Compatible with Backbone.js v1.1.1.

Backbone-Associations v0.5.5

17 Jan 02:49
Compare
Choose a tag to compare
  • Improve event bubbling performance for large object graphs.
  • Introduces flags to switch off/on events. Set Backbone.Associations.EVENTS_WILDCARD = false to stop throwing wild-char events. Set Backbone.Associations.EVENTS_NC = false to stop throwing nested-change events. Set Backbone.Associations.EVENTS_BUBBLE = false to conditionally stop events from bubbling up. May be useful when constructing complex object (sub) graphs. After construction the value can be set to true. Note that all of these flags can be toggled at any time during the application flow.
  • Introduces isTransient flag to avoid serializing the particular attribute in toJSON().
  • Introduces remoteKey for serializing relations to a different key name. Useful in ROR nested-attributes like scenarios.

Backbone Associations v0.5.4

13 Nov 05:48
Compare
Choose a tag to compare
  • Supports Backbone v1.1.0
  • Allows for polymorphic models in 1:M relations
  • IE 8 compatibility fix - Issue #77
  • Fix for idAttribute - Issue #80

Backbone Associations v0.5.3

27 Sep 17:03
Compare
Choose a tag to compare
  • Enhancement (Issue #68) : Allow users to change path separator globally. This will allow attributes with a period('.') in their name.
  • Bug Fix #67 : Preserve object references.
  • Bug Fix #66 : Browserify compatibility.

Backbone Associations v0.5.2

02 Sep 05:52
Compare
Choose a tag to compare
  • 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.