mongoose-plugin-autoinc
mongoose-plugin-autoinc copied to clipboard
does not work across Multiple Database : useDB
I was trying to make this work across DB ,so that every DB maintains its own collection IdentityCounter but found that its just creating it on the primary connection
I have added a test here if you want to have a look
https://github.com/anoopsinghbayes/mongoose-plugin-autoinc/blob/71780f3e5d0b65000f725e450b4e28210d2fbd74/src/tests/index-test.js#L436
(note could'nt install mongodb-memory-server hence my test use MongoDB instance )
Please open PR with broken test. Try find time on this week to fix this problem.
Thanks.