-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
startAt Not working #15
Comments
Tests for mongoose-plugin-autoinc/src/__tests__/index-test.js Lines 134 to 152 in f4807c9
So it looks like
... then it will take only that So feel free to change value |
I keep getting this for any record created AFTER the first. I've tried dropping both collections (the identityCounter and the affected collection), and it's still returning me this error: E11000 duplicate key error index |
So I think I know what I'm missing. In my start.js, I have:
And then in my model (Invoice):
So I'm missing:
but I'm not really sure how that works, because up until now I've just been doing:
|
I'm so sorry guys, I've actually fixed it – it was my sleepy brain that was causing it. I needed to clear the index. What I have, which works, is:
Which to be honest, I'm not sure if that's the right thing to do, but it works. |
The same thing happens to me, but I have not solved it. they help me? How can I reset the field if the collection is deleted? |
Thank you for rescuing this package from the dead guys.
This was an issue with the previous package as well, but the startAt function doesn't work. I've also just tried saving a schema twice... and both don't increment at all. So it could be an issue stemming deeper than just startAt
The text was updated successfully, but these errors were encountered: