You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Counter already defined for field "mySharedCounter"
at Sequence.getInstance (D:\PROJECTS\golden\node_modules\mongoose-sequence\lib\sequence.js:69:15)
at Schema.plugin (D:\PROJECTS\golden\node_modules\mongoose\lib\schema.js:1198:3)
Not sure but I believe that the behavior should be: "If the counter already exists, use that counter". Or maybe create a new option (perhaps useSharedCounter: true //default false
So the library not throw error if there's already a counter with same name if useSharedCounter=true
Suppose I have 2 schemas:
I need to use same counter (same sequence) for both schemas
So, I expected to write the following code:
But the program crashes with the following error
Not sure but I believe that the behavior should be: "If the counter already exists, use that counter". Or maybe create a new option (perhaps
useSharedCounter: true //default false
So the library not throw error if there's already a counter with same name if useSharedCounter=true
Then I write the following code:
The text was updated successfully, but these errors were encountered: