-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Ghost collections auto-created for each subdocument #11498
Comments
Can be disabled with |
Thanks. |
np |
Actually when do you use PawModel? |
I assume you never actually need PawModel, so you can delete PawModel. |
It actually didn't work. Ghost collections are still created all around. I even tried setting |
@sandorvasas you don't need |
Do you want to request a feature or report a bug?
BUG
What is the current behavior?
I don't know since when this is happening, I just noticed recently that empty collections were created in our DB. one collection for each subdocument in the schema. For example, if we have a schema like
Results in two automatically created collections: paws and doggos. This had not been happening before. collection above is only defined for doggos, so it should only create doggos, as before.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose 6.2.1
Node 16.14
MongoDB 4.4.12
The text was updated successfully, but these errors were encountered: