These are chat archives for Automattic/mongoose

17th
Nov 2015
Israel Cruz
@dantaex
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
@rapitkan
Nov 17 2015 09:52
Hello
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
@uptownhr
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
@diegoaguilar
Nov 17 2015 23:51
What's Mongoose official alternative for soft delete support?