Complete MongoDB Tutorial #14 - Updating Documents

Complete MongoDB Tutorial #14 - Updating Documents

Net Ninja

2 года назад

77,167 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@jhonathanmaia386
@jhonathanmaia386 - 16.11.2023 03:42

I have a question, I'm new to MongoDb and I came across a situation which is the following. Using your books collection as an example, how would you update a property of your nested array of reviews, let's say you would like to updated the "body" of the first review on for your "The Color of Magic" book , I can't figure how would you do that.

Ответить
@Pareshbpatel
@Pareshbpatel - 01.09.2023 18:49

Such a clear tutorial on updating MongoDB Documents. Thank you, Shaun.

{2023-09-01}

Ответить
@jtlewis81
@jtlewis81 - 11.06.2023 20:08

if only my CST-345 class referenced this series as the curriculum for MongoDB! I could not figure out how to use the shell for MongoDB based on their instructions. Thank you!

Ответить
@henriqueflorencio5275
@henriqueflorencio5275 - 18.01.2023 21:06

The push and pull operators (with the each) were right on the money!

Thanks a lot mate, saved me a day or two over here 😅

Ответить
@alirezamac9634
@alirezamac9634 - 13.12.2022 00:05

👍👍👍

Ответить
@mikuronightray5902
@mikuronightray5902 - 11.12.2022 03:41

There's an error when pulling with $each: MongoServerError: unknown top level operator: $each. If you have a field name that starts with a '$' symbol, consider using $getField or $setField.
I simply replaced the $push operator to $pull. Does $each only work for $push?

Ответить
@tobiolaleye3353
@tobiolaleye3353 - 08.09.2022 03:42

God bless you sensei 🙇‍♂️🙏

Ответить
@johnsolly
@johnsolly - 30.08.2022 21:12

If you want to pull these values back out:
db.books.updateOne({ _id: ObjectId("630e45de45c09161952d2db5") }, {$pull: {genres: {$in: ["2", "1"]}}})

Ответить
@dweebycat9929
@dweebycat9929 - 15.07.2022 06:39

You're my favourite go-to tutorial!

Ответить
@user-yy8gb5rw7z
@user-yy8gb5rw7z - 21.04.2022 21:16

good presentation of practical skills

Ответить
@mitchell4217
@mitchell4217 - 18.04.2022 04:35

Is there a scenario with MongoDB or NOSQL in general where you would still use a lookup table? Thinking in this example where we would have a separate lookup table with authors. Then the "author" value would be a reference to the Author Lookup Table's unique ID.

Ответить
@borgaiskender796
@borgaiskender796 - 03.04.2022 01:40

After mongodb is there a chance for you to make mariadb? I am so used to your tutorials that it can help me very much seeing it from you :D

Ответить
@themajesticbeard1497
@themajesticbeard1497 - 02.04.2022 14:08

This series couldn't have come at a better time, as I'm looking to start working on a large project and leaning towards the MERN stack. Cheers Shaun, great content and easy to follow, as always!

Ответить
@vinayakram5133
@vinayakram5133 - 02.04.2022 05:18

Need mysql tutorials

Ответить
@jeal0uspengu1n
@jeal0uspengu1n - 01.04.2022 23:59

great stuff man!!!

Ответить
@sadev0
@sadev0 - 01.04.2022 19:45

Hey Shaun, It would be great If you add videos about complex queries and relation strategies.

Ответить
@fosfatazmotest7657
@fosfatazmotest7657 - 01.04.2022 11:46

Hey man great stuff, could you do some cypress tutorials please. Love from Bosnia 🇧🇦

Ответить