backbone-db-redis
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -121,2 +121,5 @@ var _ = require('underscore') | ||
destroy: function(model, options, callback) { | ||
// force wait option, since otherwise Backbone removes Model's reference to collection | ||
// which is required for clearing indexes | ||
options.wait = true; | ||
var self = this; | ||
@@ -123,0 +126,0 @@ var key = this._getKey(model, options); |
@@ -50,2 +50,4 @@ var debug = require('debug')('backbone-db-redis:indexing'); | ||
indexes.forEach(function (index) { | ||
// does the data meet dependency for the index, | ||
// i.e. should this model attribute be indexed | ||
var meetsDependencies = function() { | ||
@@ -76,3 +78,2 @@ var dependencies = index.dependencies; | ||
} | ||
// value was changed or deleting object | ||
@@ -79,0 +80,0 @@ if((operation === 'add' && prevData && prevData[key] && prevData[key] !== data[key]) || |
{ | ||
"name": "backbone-db-redis", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Redis driver for Backbone.Db", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -106,2 +106,3 @@ var assert = require('assert'); | ||
assert(model); | ||
assert(model.collection); | ||
model | ||
@@ -108,0 +109,0 @@ .destroy() |
54391
1780