Hi
I have and issue after upgrade from 1.0.1 to 1.0.3.
TypeError: Object #<NativeConnection> has no method 'ensureIndex'
in version 1.0.3 there is new lines which calls ensureIndex. Since this does not exist in native mode above error get thrown
basically I try to run following code
var mongoose = require('mongoose');
var CachemanMongo = require('cacheman-mongo');
console.log('Setting up mongoose');
var mongoose_db;
var cache;
var connect = function() {
var options = {
server: {
socketOptions: {
keepAlive: 1
}
}
};
databaseURL = 'codolutionstest.com:27017/mydb';
mongoose_db = mongoose.createConnection(databaseURL, options);
cache = new CachemanMongo({
client: mongoose_db,
collection: 'cacheman'
});
};
connect();
mongoose_db.on('error', console.log);
mongoose_db.on('disconnected', connect);
cache.get('cacheKey', function(err, data) {
console.log(data);
});
Hi
I have and issue after upgrade from 1.0.1 to 1.0.3.
in version 1.0.3 there is new lines which calls ensureIndex. Since this does not exist in native mode above error get thrown
basically I try to run following code