3

I am trying to use mongoose-sequence, I did some test but once i use the "id" field i created again with new sequence it gives the error : throw new Error(Counter already defined for field "${id}");

Also i am trying to set the start_seq attribute after testing but it keeps increment from 1

couponSchema.plugin(AutoIncrement, {inc_field: 'id',start_seq: 2000001 })

I am using :

"mongodb": "^3.5.7",
"mongoose": "^5.9.11",
"mongoose-sequence": "^5.2.2",

0 Answers0