These are chat archives for Automattic/mongoose

30th
Oct 2015
Joseph Thibeault
@jrthib
Oct 30 2015 17:40
hey, so i have a sub doc schema with a plugin i wrote on it that checks if a path on the subdoc isDirectModified before it performs any operations. It seems like if any of the subdocs in the array has been modified, all of them report isDirectModified on that same path to be true
is this expected behavior?
i had assumed that only the subdoc that had actually been modified would report as isDirectModified = true
Diego Aguilar Aguilar
@diegoaguilar
Oct 30 2015 18:08
Hello, setting an index at schema definition makes idempotent effect if it already being set
right?
James Lee
@uptownhr
Oct 30 2015 18:28
@diegoaguilar i believe so
it will not drop and recreate
if that is what you are worried about
i think mongo driver api is ensureIndex
so if it exists, it won't recreate
Diego Aguilar Aguilar
@diegoaguilar
Oct 30 2015 18:32
thanks @uptownhr
tell me, how do u use mongodb
:)
I mean, what kind of apps
James Lee
@uptownhr
Oct 30 2015 18:35
i use it for most apps :)
lol