Hi - just wondering, am I supposed to be able to push more items to an existing subdocument array when using this plugin?
I'm not talking about the 'caveat' mentioned, i'm just talking about loading an existing document with a few subdocuments and trying to push more (non-unique) subdocuments to the array, before calling save.
Hi - just wondering, am I supposed to be able to push more items to an existing subdocument array when using this plugin?
I'm not talking about the 'caveat' mentioned, i'm just talking about loading an existing document with a few subdocuments and trying to push more (non-unique) subdocuments to the array, before calling save.
see test here: https://github.com/cjroebuck/mongoose-unique-array/commit/df104917ed9784b549adcd652c9d8df7f41f6598
It's throwing the VersionError due to all of the
$nin
's in the where clause ofupdateOne