Comparing version 0.1.4 to 0.1.5
@@ -1,2 +0,2 @@ | ||
// Bookshelf.js 0.1.4 | ||
// Bookshelf.js 0.1.5 | ||
@@ -28,3 +28,3 @@ // (c) 2013 Tim Griesser | ||
// Keep in sync with `package.json`. | ||
Bookshelf.VERSION = '0.1.4'; | ||
Bookshelf.VERSION = '0.1.5'; | ||
@@ -240,4 +240,3 @@ // We're using `Backbone.Events` rather than `EventEmitter`, | ||
return this.sync(this, options).first().then(function(model) { | ||
model._reset(); | ||
return model; | ||
return model._reset(); | ||
}); | ||
@@ -300,5 +299,3 @@ }, | ||
model.trigger('saved', model, resp, options); | ||
model._reset(); | ||
return model; | ||
return model._reset(); | ||
}) | ||
@@ -320,4 +317,3 @@ .ensure(function() { model.resetQuery(); }); | ||
model.trigger('destroyed', model, resp, options); | ||
model._reset(); | ||
return resp; | ||
return model._reset(); | ||
}).ensure(function() { | ||
@@ -364,2 +360,4 @@ model.resetQuery(); | ||
} | ||
model._previousAttributes = _.clone(this._previousAttributes); | ||
model.changed = _.clone(this.changed); | ||
return model; | ||
@@ -431,2 +429,3 @@ }, | ||
this.changed = extendNull(); | ||
return this; | ||
}, | ||
@@ -705,3 +704,3 @@ | ||
for (var i = 0, l = resp.length; i < l; i++) { | ||
models.push(new relation.modelCtor(resp[i], {parse: true})); | ||
models.push(new relation.modelCtor(resp[i], {parse: true})._reset()); | ||
} | ||
@@ -791,3 +790,3 @@ | ||
} else { | ||
model.reset(resp, {silent: true, parse: true}); | ||
model.reset(resp, {silent: true, parse: true}).each(function(m) { m._reset(); }); | ||
} | ||
@@ -814,3 +813,3 @@ | ||
if (model instanceof Model) { | ||
model.clear({silent: true}); | ||
model.clear({silent: true})._reset(); | ||
return {}; | ||
@@ -817,0 +816,0 @@ } |
{ | ||
"name": "bookshelf", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "A lightweight ORM for Postgres, MySQL, and SQLite3 with some Backbone", | ||
@@ -5,0 +5,0 @@ "main": "bookshelf.js", |
@@ -204,2 +204,5 @@ var When = require('when'); | ||
new Site({id: 1}).admins().fetch().then(function(c) { | ||
c.each(function(m) { | ||
equal(m.hasChanged(), false); | ||
}); | ||
equal(c.at(0).has('pivot_item'), true); | ||
@@ -206,0 +209,0 @@ equal(c.length, 2); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137444
3671