question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Option `refPath` to `mongoose.SchemaTypeOptions`

See original GitHub issue

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

I have just noticed that the type for mongoose.SchemaTypeOptions does not include the option refPath.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
hasezoeycommented, Jun 2, 2022

The class itself does not have refPath attribute.

i didnt look into the class itself before opening this issue, so i will change the title to match the “new state”

0reactions
vkarpov15commented, Jun 11, 2022

@Uzlopak yes it’ll work. The property definitions in SchemaTypeOptions are just for documentation and readability, but thanks for the reminder. I’ll add refPath there too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mongoose v6.8.1: SchemaTypeOptions
If truthy, Mongoose will build a unique index on this path when the model is compiled. The unique option is not a validator....
Read more >
mongoose/History.md - UNPKG
mongoose /History.md ; 3, * fix(schema): check that schema type is an object when setting isUnderneathDocArray #10361 [vmo-khanus](https://github.com/vmo-khanus).
Read more >
How do you add Multiple options to one Mongoose Schema?
Sorry, I figured how to work it out. For anyone wondering: const exampleSchema = new Schema({ title: String, price: Number, ...
Read more >
backend/node_modules/mongoose/History.md - Git01Lab
fix(model): support populate option for insertMany() as a workaround ... have refPath but none of the subdocs have refPath #8553; docs: add ......
Read more >
Populate - Mongoose - W3cubDocs
The refPath option is a more sophisticated alternative to ref . If ref is just a string, Mongoose will always query the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found