TypeError: model.collection.addQueue is not a function because property "collection" is overwritten when loading class and "collection" was provided in class #10254
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Milestone
version 5.12.8 worked fine and since 5.12.9 the following bug occures when building the schemas:
I don't know how to reproduce this, but the logging on the tracebacks given position, following will be printed:
Line of code:
logging:
console.log(model, model.collection, model.collection.addQueue)
Result:
The model SystemUser is derived from Model user and both have the same collection.
The collection "users" seems to be a String instead of a "NaviveCollection"-Object
Expected behavior is to queue the collection
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node: v12.13.0
mongoose: 5.12.9
MongoDB: 4.4.2 Community
The text was updated successfully, but these errors were encountered: