These are chat archives for Automattic/mongoose

20th
Jul 2016
Fabio Luz
@fabioluz
Jul 20 2016 02:39
is there anybody in there? I'm having problems with my query
Martin Reynolds
@Hobbit71
Jul 20 2016 05:49
What is the problem fabio
Dario
@dario1985
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 http://stackoverflow.com/questions/38094817/mongoose-advanced-custom-schema-object-type but without success :(
Anybody can help?
binarious
@binarious
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?

nacq
@nacq
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.