Skip to content

Releases: oktavilla/backbone-despotism

v1.0.0

16 May 14:57
Compare
Choose a tag to compare

Data mapping is now optional. It is enabled per function call by using the option useForeignKeys.

v0.2.1

30 Mar 14:20
Compare
Choose a tag to compare

Fixes #10.

v0.2.0

10 Mar 14:13
Compare
Choose a tag to compare

Foreign key conversion will now only happen automatically when a model is created or on a reset. In other instances the conversion has to be explicitly requested by using the useForeignKeys set option.

This change makes it possible to change the value of a property which is set up to use a foreign key.

Example:

var MyStrictModel = Backbone.StrictModel.extend({
  props: {
    "name": {
      "type": Backbone.StrictModel.type.STRING,
      "foreignKey": "firstName"
    }
  }
});

In the example above, doing new MyStrictModel({ firstName: "Göran" }) will result in a model with { "name": "Göran" }. However, when just setting properties, you will need to be explicit about wanting to use the foreign mappings. For example, myModelInstance.set({ firstName: "Sven" }) will have no effect on the model instance, but myModelInstance.set({ firstName: "Sven" }, { useForeignKeys: true }) will.

v0.1.5

02 Jul 09:19
Compare
Choose a tag to compare

Fixes a bug when an attribute had both a foreign key and a default value.

v0.1.4

30 Jun 22:23
Compare
Choose a tag to compare
  • Fixes bug when an empty string was set as a value for a attribute with a foreign key.
  • Adds missing return value to Backbone.StrictModel.set.

v0.1.3

11 May 11:40
Compare
Choose a tag to compare

Allows property values like "" and 0 to be set.

v0.1.2

27 Apr 14:36
Compare
Choose a tag to compare

Fixes issues with unset.

v0.1.1

22 Apr 08:51
Compare
Choose a tag to compare

Style fixes

v0.1.0

22 Apr 08:44
Compare
Choose a tag to compare

First version