Releases: oktavilla/backbone-despotism
Releases · oktavilla/backbone-despotism
v1.0.0
v0.2.1
v0.2.0
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
v0.1.4
v0.1.3
v0.1.2
v0.1.1
Style fixes
v0.1.0
First version