These are chat archives for Automattic/mongoose

Sep 2018
Arun Kumar
Sep 11 2018 02:12
@lineus Thanks a lot, Kev.
Andrey Gazhala
Sep 11 2018 12:30
Hello to all) When I use this code, I have an error Error: Can't use $elemMatch with String. Does anyone know what the problem is?
Category.findOne({ 'name' : { $elemMatch : { $regex : 'прочее', $options : 'i' }}})
            .exec(function(err, templateCategory) {
Sep 11 2018 13:30
@AndreyGazhala is your name path an array or a string type?
Andrey Gazhala
Sep 11 2018 14:10
@lineus string
@lineus this code worked, I do not understand the error