Tags » Mongoose

Mongoose B2

Shave of the Day
December 19, 2014
Cocoa Maya soap
Kingsley badger brush
Mongoose B2
Feather Professional (13)
Pinaud Clubman Club Royale

'Goose B2

Handling Uniqueness Validation in Mongo/Mongoose

Approach 1:

Simple custom validation function -

function validator (val) { return val == 'something'; }

var custom =

new Schema({ name: { type: String, validate: custom }});

205 more words
NodeJS

Mongoose in debug mode

Run mongoose in debug mode -

mongoose.set(‘debug’, true)

This will output the generated queries as they are executed in mongo like so

Mongoose: permissions.insert({ __v: 0, httpVerb: [ ‘GET’, ‘PUT’ ], modified: new Date(“Thu, 20 Dec 2012 07:11:58 GMT”), created_on: new Date(“Thu, 20 Dec 2012 07:11:58 GMT”), _id: new Date(“Thu, 20 Dec 2012 07:11:58 GMT”), employeeCode: ‘12346’, employeeName: ‘test’, userEmail: ‘test@testdomain.com’ }) { safe: true }

Quite helpful!

Database

Mongoose

Shave of the Day
December 17, 2014
Soap Commander Confidence soap
Omega boar brush
Mongoose B2 razor with Dub Legend handle
Feather Professional blade (12)
Pinaud Classic Vanilla aftershave

'Goose B2

CAN'T CATCH A BREAK

Seems like I just can’t catch a break when it comes to shoes – of course it’s my own fault as I buy what’s cheap. But I mean really, after two months or so the latest pair is unraveling? 390 more words

Mongoose B2

Shave of the Day
December 13, 2014
34th Wedding Anniversary shave
Martin de Candre Fougere soap
Muhle badger brush
B2 Mongoose with Dub Legend handle… 25 more words

'Goose B2