Skip to content

Commit 2b948fd

Browse files
authored
Merge pull request #13090 from hasezoey/updatePopulateDocs
docs: fix populate docs
2 parents 3d4378b + 66f1ea6 commit 2b948fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/populate.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ user and have a good reason for doing so.
4444
<li><a href="#field-selection">Field Selection</a></li>
4545
<li><a href="#populating-multiple-paths">Populating Multiple Paths</a></li>
4646
<li><a href="#query-conditions">Query conditions and other options</a></li>
47+
<li><a href="#limit-vs-perDocumentLimit"><code>limit</code> vs. <code>perDocumentLimit</code></a></li>
4748
<li><a href="#refs-to-children">Refs to children</a></li>
4849
<li><a href="#populate_an_existing_mongoose_document">Populating an existing document</a></li>
4950
<li><a href="#populate_multiple_documents">Populating multiple existing documents</a></li>
5051
<li><a href="#deep-populate">Populating across multiple levels</a></li>
5152
<li><a href="#cross-db-populate">Populating across Databases</a></li>
52-
<li><a href="#dynamic-ref">Dynamic References via `refPath`</a></li>
53+
<li><a href="#dynamic-ref">Dynamic References via <code>refPath</code></a></li>
5354
<li><a href="#populate-virtuals">Populate Virtuals</a></li>
5455
<li><a href="#count">Populate Virtuals: The Count Option</a></li>
5556
<li><a href="#match">Populate Virtuals: The Match Option</a></li>
@@ -275,7 +276,7 @@ story; // null
275276

276277
If you want to filter stories by their author's name, you should use [denormalization](https://www.mongodb.com/blog/post/6-rules-of-thumb-for-mongodb-schema-design-part-3).
277278

278-
<h3 id="limit-vs-perDocumentLimit"><a href="#limit-vs-perDocumentLimit">limit vs. perDocumentLimit</a></h3>
279+
<h3 id="limit-vs-perDocumentLimit"><a href="#limit-vs-perDocumentLimit"><code>limit</code> vs. <code>perDocumentLimit</code></a></h3>
279280

280281
Populate does support a `limit` option, however, it currently
281282
does **not** limit on a per-document basis for backwards compatibility. For example,
@@ -485,9 +486,8 @@ const events = await Event.
485486
populate({ path: 'conversation', model: Conversation });
486487
```
487488

488-
<h3 id="dynamic-ref"><a href="#dynamic-ref">Dynamic References via `refPath`</a></h3>
489-
490-
Mongoose can also populate from multiple collections based on the value
489+
<h3 id="dynamic-ref"><a href="#dynamic-ref">Dynamic References via <code>refPath</code></a></h3>
490+
<code>
491491
of a property in the document. Let's say you're building a schema for
492492
storing comments. A user may comment on either a blog post or a product.
493493

0 commit comments

Comments
 (0)