Apply proper formatting on Note paragraph (#38120)

pull/38127/head
Ezekiel Oladejo 2020-01-27 00:31:51 +01:00 committed by Randell Dawson
parent fda7fb174e
commit 7453131461
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ In the good old days this was what you needed to do if you wanted to edit a docu
Find a person by <code>_id</code> ( use any of the above methods ) with the parameter <code>personId</code> as search key. Add &quot;hamburger&quot; to the list of the person&apos;s <code>favoriteFoods</code> (you can use <code>Array.push()</code>). Then - inside the find callback - <code>save()</code> the updated <code>Person</code>.
<strong>Note:</strong> This may be tricky, if in your Schema, you declared <code>favoriteFoods</code> as an Array, without specifying the type (i.e. <code>[String]</code>). In that <code>casefavoriteFoods</code> defaults to Mixed type, and you have to manually mark it as edited using <code>document.markModified('edited-field')</code>. See [Mongoose documentation](https://mongoosejs.com/docs/schematypes.html#Mixed)
<strong>Note:</strong> This may be tricky, if in your Schema, you declared <code>favoriteFoods</code> as an Array, without specifying the type (i.e. <code>[String]</code>). In that case, <code>favoriteFoods</code> defaults to Mixed type, and you have to manually mark it as edited using <code>document.markModified('edited-field')</code>. See [Mongoose documentation](https://mongoosejs.com/docs/schematypes.html#Mixed)
</section>