These are chat archives for Automattic/mongoose

Sep 2016
Matija Urh
Sep 27 2016 09:03
Hi, I have and object in my document with 100 elements and each element is object with 100 element. I'm doing findOneAndUpdate and if I write by hand (for example) { 'values.23.58' : 10} it works and element 58 inside element 25 is updated, but how do I set this parameter dynamically in code?
Sep 27 2016 10:22
I want to do contain search on "_id" of mongoose. i.e. my _id is "57ea37e3657972c419000002" and I type "002". I want to filter this record
Sep 27 2016 20:01
hi @all
Mongoose queries are not promises. However, they do have a .then() function for yield and async/await. If you need a fully-fledged promise, use the .exec() function.
whats the difference between the promise a query returns between a "fully-fledged" one?
Sep 27 2016 22:21
Fundamentally, all Promise chains care about is that there's a .then method attached to an object. Query satisifies that but it's not a formal Promise.
I guess to answer you question, a Query is like a Promise but with some extra cruft