Error on defining more than one self-referencing discriminated schema #15120
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
8.9.1, 8.7.3
Node.js version
18.16.0
MongoDB server version
4.8.1
Typescript version (if applicable)
No response
Description
Defining more than one discriminated schema causes an
Error: Discriminator with name already exists
Steps to Reproduce
Expected Behavior
Should be able to define any number of schemas that self reference.
The text was updated successfully, but these errors were encountered: