modermo
modermo
I'd love to know this as well if possible...
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...
So I think I know what I'm missing. In my start.js, I have: ``` mongoose.connect(process.env.DATABASE); const autoIncrement = require('mongoose-plugin-autoinc'); const mongooseConnection = mongoose.connection ``` And then in my model (Invoice):...
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:...