These are chat archives for Automattic/mongoose

Feb 2017
Justin Ho
Feb 11 2017 05:29
I just use a "verified" flag in the User collection
Anyone know if you can get populate() on virtuals to return single objects, and not arrays all the time?
Justin Ho
Feb 11 2017 05:35
I figured it out. there is a justOne property :)
Ayush Bahuguna
Feb 11 2017 17:10

Hi, I am new to Mongoose. I have a question.

var Kitten = mongoose.model('Kitten', kittySchema);

in the above code, does the var name and the term inside the model has to be the same?

var kitty = mongoose.model('Kitten', kittySchema)

be correct?
and later I'd use

var furry = new kitty({name: 'furr'});