Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #150 from fshost/mongodb

update mongodb adapter
  • Loading branch information...
commit c28b80392719fc1f932ebb1b9e6bf3c0f2c5c4fe 2 parents 3731447 + 596cd3d
@1602 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/adapters/mongodb.js
View
5 lib/adapters/mongodb.js
@@ -49,6 +49,9 @@ exports.initialize = function initializeSchema(schema, callback) {
s.database = s.database || 'test';
}
+
+ s.safe = s.safe || false;
+
schema.adapter = new MongoDB(s, schema, callback);
};
@@ -69,7 +72,7 @@ function MongoDB(s, schema, callback) {
server = new mongodb.Server(s.host, s.port, {});
}
- new mongodb.Db(s.database, server, {}).open(function (err, client) {
+ new mongodb.Db(s.database, server, { safe: s.safe }).open(function (err, client) {
if (err) throw err;
if (s.username && s.password) {
t = this;
Please sign in to comment.
Something went wrong with that request. Please try again.