Comparing version 1.7.2 to 1.7.3
1.7.3 / 2011-07-16 | ||
=================== | ||
* fixed; MongooseArray#indexOf now works with ObjectIds | ||
* fixed; validation scope now set properly (#418) | ||
* fixed; added missing colors dependency (#398) | ||
1.7.2 / 2011-07-13 | ||
@@ -4,0 +10,0 @@ =================== |
@@ -520,6 +520,5 @@ | ||
} | ||
--total || | ||
--total || | ||
(validationError ? next(validationError) : next()); | ||
}); | ||
}, self); | ||
}); | ||
@@ -526,0 +525,0 @@ validating[path] = true; |
@@ -292,3 +292,3 @@ | ||
exports.version = '1.7.2'; | ||
exports.version = '1.7.3'; | ||
@@ -295,0 +295,0 @@ /** |
@@ -7,2 +7,3 @@ | ||
var EmbeddedDocument = require('./document'); | ||
var ObjectId = require('./objectid'); | ||
@@ -328,2 +329,3 @@ /** | ||
MongooseArray.prototype.indexOf = function(obj){ | ||
if (obj instanceof ObjectId) obj = obj.toString(); | ||
for (var i = 0, len = this.length; i < len; ++i) { | ||
@@ -330,0 +332,0 @@ if (obj == this[i]) |
{ | ||
"name": "mongoose" | ||
, "description": "Mongoose MongoDB ORM" | ||
, "version": "1.7.2" | ||
, "version": "1.7.3" | ||
, "author": "Guillermo Rauch <guillermo@learnboost.com>" | ||
@@ -10,2 +10,3 @@ , "keywords": ["mongodb", "mongoose", "orm", "data", "datastore", "nosql"] | ||
, "mongodb": "0.9.6-7" | ||
, "colors": "0.5.0" | ||
} | ||
@@ -12,0 +13,0 @@ , "devDependencies": { |
@@ -58,3 +58,3 @@ | ||
[tobi, loki, jane].forEach(function(pet){ | ||
;[tobi, loki, jane].forEach(function(pet){ | ||
pet.save(function(){ | ||
@@ -69,2 +69,3 @@ --pending || done(); | ||
User.findOne({ name: 'tj' }, function(err, user){ | ||
db.close(); | ||
should.equal(null, err, 'error in callback'); | ||
@@ -75,3 +76,5 @@ user.pets.should.have.length(3); | ||
user.pets.indexOf(jane.id).should.equal(2); | ||
db.close(); | ||
user.pets.indexOf(tobi._id).should.equal(0); | ||
user.pets.indexOf(loki._id).should.equal(1); | ||
user.pets.indexOf(jane._id).should.equal(2); | ||
}); | ||
@@ -78,0 +81,0 @@ }); |
Sorry, the diff of this file is too big to display
611367
14426
3
+ Addedcolors@0.5.0
+ Addedcolors@0.5.0(transitive)