These are chat archives for Automattic/mongoose

Jul 2016
Fabio Luz
Jul 20 2016 02:39
is there anybody in there? I'm having problems with my query
Martin Reynolds
Jul 20 2016 05:49
What is the problem fabio
Jul 20 2016 08:42
Hello everybody!
I have a question about how to implement custom schema type with custom objects (like value-objects, etc). I already posted it on but without success :(
Anybody can help?
Jul 20 2016 14:19

Hey, I'm trying to update a document field which hasn't been set. It's in the schema but not defined in the document, yet. It doesn't seem to work with fineOneAndUpdate:

await User.findOneAndUpdate(req.user._doc._id, req.body, {});

This won't add the field. Any ideas?

Jul 20 2016 23:47
How can I update array1.array2.status having this schema var SomeSchema = new mongoose.Schema({ status: Boolean, array1: [{ array2: [{ status:boolean }] }] }) any help very appreciated.