These are chat archives for Automattic/mongoose

24th
Jul 2018
dan-gre
@dan-gre
Jul 24 2018 00:37
Thanks @ThisIsNoZaku
Mihajlo Ilijić
@Pritilender
Jul 24 2018 12:43
Hey, does anyone know if and when does Mongoose cast strings to numbers if I specify type: Number for a field?
Kev
@lineus
Jul 24 2018 13:00
@Pritilender it should cast in the query condition, also in the update doc for update queries, and when you create a new doc either with new Model or Model.create().
probably some other scenarios not immediately coming to mind
Mihajlo Ilijić
@Pritilender
Jul 24 2018 13:02
Thanks @lineus