These are chat archives for Automattic/mongoose

Nov 2015
Israel Cruz
Nov 17 2015 00:10
the second one does nothing
the first one actually updates the document
Document is successfully updated when I change Product.update for Product.findOneAndUpdate
why is that?
Raimo Pitkänen
Nov 17 2015 09:52
I’m trying to make unit tests for my application. I’m using MongoDB and Mongoose. The problem is that I’m getting this error:
TypeError: mongoose.connect is not a function
That seems to be true. I printed out the keys of mongoose object and there isn’t connect-function.
LOG: 'Error'
LOG: 'Schema'
LOG: 'Types'
LOG: 'VirtualType'
LOG: 'SchemaType'
LOG: 'utils'
LOG: ‘Document’
Has anyone faced this problem? How to connect without connect method?
James Lee
Nov 17 2015 17:28
@rapitkan can you show your code of how you require in mongoose and how you are calling mongoose.connect
Diego Aguilar Aguilar
Nov 17 2015 23:51
What's Mongoose official alternative for soft delete support?