Skip to content
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

Documentation of discriminator custom _id field text doesn't match example #8588

Closed
sam-mfb opened this issue Feb 13, 2020 · 1 comment
Closed
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation

Comments

@sam-mfb
Copy link
Contributor

sam-mfb commented Feb 13, 2020

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
The text describing the behavior of cust _id fields doesn't match the example. The text says:

You can work around this by setting the _id option to false in the discriminator schema as shown below.

But the example does demonstrate this workaround, it simply shows how the custom _id on the base schema overrides the discriminator schema.

If the current behavior is a bug, please provide the steps to reproduce.

Review of the documentation at https://mongoosejs.com/docs/discriminators.html#handling-custom-_id-fields

What is the expected behavior?
The example should demonstrate the text, i.e., show how overriding the discriminator _id can be worked around.

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js - 13.8.0
Mongoose - 5.8.12
MongoDB - 4.2.3.

@sam-mfb
Copy link
Contributor Author

sam-mfb commented Feb 14, 2020

This has been resolved by this pull request, but I (stupidly?) can't figure out how to link them.

@vkarpov15 vkarpov15 added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

No branches or pull requests

2 participants