Came here after your MongoDB crash. Man, I just want to let you know, you have taken so many extra miles to give your viewer nothing but your absolute best. I'm glad I am spending hours from my life watching your content. Thank you for your service, Kyle.
Another way to add createdAt and updatedAt, is to just add a second argument to Schema( ), an object with a property timestamps set to true! Fantastic tutorial!
This is a goldmine, this video has got to have the highest value per second watched ever. Thank you Kyle! I'm not even kidding when I say you answered some of the questions that keep me awake at night in a 30 Min video
Kyle always reading minds! I was just taking a break from brushing up on mongoose! Lol just spent 20 minutes trying to update an item in a nested array, I made it wayyyy harder than it really was... but I'll just brush up with this video now. Thank you my man!
This should be a whole series! You could flesh out each of those concepts into real world scenarios. Much appreciated for filling the gaps in my mongoose acumen 🙌
This is my first time using mongoose and this video gave me everything I needed even though I had no prior knowledge. ABSOLUTE BEST, keep up the good work man!!
I've watched a number of your videos, you have a real knack for getting straight to heart of how things work, and how to use them. Many thanks my friend!
I love the way you explain everything simple and clear. Also you're not passing the advanced topics, instead explaining them really good which is awesome. Thanks
Thanks for the tutorials. I've started here, gone back to another video you referenced about async await, gone back from there again to another video you referendec about promises, then back to here and it's all making sense to me right now. I can't believe I went through an entire udemy "complete web development" course without learning about async and promises.
Thank you for this great video! I would like to add a comment about the difference between virtual methods and regular methods : both provide ways to add functionality to Mongoose schemas. Virtual methods are mainly used for defining computed properties, while regular methods are used for defining reusable functionality (in this video it was displaying a log message).
Kayle, once again, an incredible tutorial. Congratulations. An excellent work. Your tutorials are helping me a lot in my new job where I´m developing basic apps with MEAN stack. I haven´t got a formal education in this topic and your work help tremendously. Thank you very much for shearing you knowledge. How I´d wish to program the way you do !!!! :) Thanks again from Argentine. Best regards Guille.
I've been doing FCC's backend course but I really had no idea how to handle saving models or anything in their entire mongoose unit. I'm glad I have your videos though, I love the way you teach bro
just what i was willing to learn today ... you're a master ... just don't rush ... our first language is not always english ... is already difficult to learn programming ... tx for u effort
Very nice tutorial. I had to watch it in 0.8x to actually let things percolate in mind! It is amazing how someone is so intelligent, good looking, eloquent and so much more at the same time. You earned a subsriber and a fan sir!
That was a good piece of advice to always use save and create in order to keep the validation middleware active. But this makes it a bit cumbersome for PATCH requests where requests carry only partial payloads and you want to leave the rest unchanged.
You really convey so much in so little time! I saw your MongoDB course earlier, that one was the same thing! Nice to have a concise resource like yours. You can watch one vid and be confident that you are aware of most of the capabilities of the software.
So, I'm using "mongoose": "^6.9.0", and these were the things I've encountered: Mongoose implicitly type casts while enforcing it's schema. Thus, if a name field is of [type: String], and you enter [name: 4], where 4 is a number, there won't be any errors, since mongoose will typecast 4 to "4". We can add [cast: false] to each field while defining the schema to tell mongoose that we don't want it to type cast it. After doing this you might get an error for the [createdAt] field, (if you are following the tutorial exactly). Here you might want to change the arrow function, from [() => Date.now()] to [() => new Date()]. The former gives you the total time passed from 1970 in seconds or something, and the latter gives you the date in standard format. (typeof Date.now() === 'Number') Also note that mongoose doesn't save the fields that are not present on the schema definition.
your cheat sheet is extremely helpful ! I recommend it to everyone!! thanks for that free gift ! I'm slowly falling in love here xD keep up the great work!
Kayle, once again, an incredible tutorial. Congratulations. An excellent work. Your tutorials are helping me a lot in my new projects. I haven´t got a formal education in this topic and your work help tremendously. Thank you very much for sharing your knowledge. Thanks again from pakistan. thanks and Best regards Adnan.
This was really an amazing and insightful video Kyle. Thank you for your efforts. Can you please make a video on how to connect front-end (using React) with back-end (using Express.js and mongoose). Would really appreciate it.
My head just exploded with so much knowledge ! Thanks for the tutorial 👍 Will watch it bunch of times to get all of it. How do you remember all of it ? (So much information)
Came here after your MongoDB crash. Man, I just want to let you know, you have taken so many extra miles to give your viewer nothing but your absolute best. I'm glad I am spending hours from my life watching your content. Thank you for your service, Kyle.
same lmao
❤❤❤
He is the only guy that makes our RUclips screentime actually usefull, so it doesn't count as gen z screen time
exactly
@@immiketyson haha good one!!
Another way to add createdAt and updatedAt, is to just add a second argument to Schema( ), an object with a property timestamps set to true! Fantastic tutorial!
This is a goldmine, this video has got to have the highest value per second watched ever. Thank you Kyle! I'm not even kidding when I say you answered some of the questions that keep me awake at night in a 30 Min video
Kyle always reading minds! I was just taking a break from brushing up on mongoose! Lol just spent 20 minutes trying to update an item in a nested array, I made it wayyyy harder than it really was... but I'll just brush up with this video now. Thank you my man!
its ok, i still cant write a for loop from memory.
@@mrdoner3451 lol as long as we can get to stackoverflow!
@@mrdoner3451 me same
its google reading your brain
@@mrdoner3451 😀
This should be a whole series! You could flesh out each of those concepts into real world scenarios. Much appreciated for filling the gaps in my mongoose acumen 🙌
WŴQaQawWWAa2w2Aŵwqawaŵwqw 2qwa
This is an excellent video.
Just enough information to get you started. 👌
roasting or praising.
I love your crash course series, whenever I forget about anything I straight away check your videos to get started. Thank you so much.
Saying "Thank you" is not enough for your effort. You are amazing mentor on youtube ever!!! God bless you, bro. Keep goin!!!
Best mongoose crash course on the internet and even better than a complete course that I took on Udemy. Thank you Kyle
Yeah my comment is the same
Momgoose schema also provides an timestamp option which when set to true creates createdAt and updatedAt property on its own
Best Mongoose tutorial. Fast and to the point amd talks about almost everything. Thank you.
This is my first time using mongoose and this video gave me everything I needed even though I had no prior knowledge. ABSOLUTE BEST, keep up the good work man!!
I've watched a number of your videos, you have a real knack for getting straight to heart of how things work, and how to use them. Many thanks my friend!
I love the way you explain everything simple and clear. Also you're not passing the advanced topics, instead explaining them really good which is awesome. Thanks
Thanks for the tutorials. I've started here, gone back to another video you referenced about async await, gone back from there again to another video you referendec about promises, then back to here and it's all making sense to me right now. I can't believe I went through an entire udemy "complete web development" course without learning about async and promises.
Every one of your videos that I watch help me break through my coding walls. Thanks for your content!
Thank you very much, I was looking for a good mongoose tutorial, and now I'm very lucky that my favorite teacher posted a new video on this topic!
Truly excellent work. I took your mongoDB course as well. You've been such a help generally!!
Loved the fact that the cheat sheet has both Dark and Light version. Thanks a lot!
Thank you Kyle.
I was working on a project and ran into some issues.
Grateful I bumped into this video.
definitely needed this. I've been so lost on the mongodb, node, and express thing due to not fully understanding mongoose. You the mvp webdev 👍👍👍
Thank you for this great video!
I would like to add a comment about the difference between virtual methods and regular methods : both provide ways to add functionality to Mongoose schemas. Virtual methods are mainly used for defining computed properties, while regular methods are used for defining reusable functionality (in this video it was displaying a log message).
just completed the course: Hands down the best course I ever encountered on mongoose
So much value packed in one video, it's unreal. Thank you for this.
I was stuck on this specific topic for so long and couldn't find the information until now, thank you so much!
Great video
Kayle, once again, an incredible tutorial. Congratulations. An excellent work. Your tutorials are helping me a lot in my new job where I´m developing basic apps with MEAN stack. I haven´t got a formal education in this topic and your work help tremendously. Thank you very much for shearing you knowledge. How I´d wish to program the way you do !!!! :) Thanks again from Argentine. Best regards Guille.
I've been doing FCC's backend course but I really had no idea how to handle saving models or anything in their entire mongoose unit. I'm glad I have your videos though, I love the way you teach bro
Your teaching skill is awesome. Love it, wish I was more involved on the front end and using NoSQL.
just what i was willing to learn today ... you're a master ... just don't rush ... our first language is not always english ... is already difficult to learn programming ... tx for u effort
He can't make everybody fit in, you'll need to develop your english ear more
Very nice tutorial. I had to watch it in 0.8x to actually let things percolate in mind! It is amazing how someone is so intelligent, good looking, eloquent and so much more at the same time. You earned a subsriber and a fan sir!
Amazing explanations, thank you so much :)!!
god bless you man, seriously you are probably the reason i got into web dev to begin with!
Needed this since a long time , many tutorials were a bit outdated. Thank you!
小伙长的真帅,感谢您的分享,让我快速的了解了mongoose.
Kyle is an alien😀😀😀😀. He knows everything in coding coz i follow this channel
That was a good piece of advice to always use save and create in order to keep the validation middleware active. But this makes it a bit cumbersome for PATCH requests where requests carry only partial payloads and you want to leave the rest unchanged.
really looking forward to a Sequelize crash course! once again . awesome job!
You really convey so much in so little time! I saw your MongoDB course earlier, that one was the same thing! Nice to have a concise resource like yours. You can watch one vid and be confident that you are aware of most of the capabilities of the software.
So focus, right to the point, so didactic and with the perfect timing dude👏👏👏
This is one of the best tutorials I have ever watched)) The speed of explanation is also fantastic
Literally I was just going to learn mongoose. 💓💕Thanks
Nice video Kyle, your were really cooking with this video.
So, I'm using "mongoose": "^6.9.0", and these were the things I've encountered:
Mongoose implicitly type casts while enforcing it's schema. Thus, if a name field is of [type: String], and you enter [name: 4], where 4 is a number, there won't be any errors, since mongoose will typecast 4 to "4".
We can add [cast: false] to each field while defining the schema to tell mongoose that we don't want it to type cast it.
After doing this you might get an error for the [createdAt] field, (if you are following the tutorial exactly). Here you might want to change the arrow function, from [() => Date.now()] to [() => new Date()]. The former gives you the total time passed from 1970 in seconds or something, and the latter gives you the date in standard format. (typeof Date.now() === 'Number')
Also note that mongoose doesn't save the fields that are not present on the schema definition.
Very straightforward and well-paced guide covering a lot of stuff with explained examples. Thanks a ton!
Thank you man, cool enough to love Mongoose & MongoDB more..!
Thanks! The mongoose docs are one of the worst I’ve ever seen 😣
Really thankful for this tutorial!
again, what a very great lesson. everything you need to get started all packed in this simple short video.
Best mongoose course on RUclips!!!!
your cheat sheet is extremely helpful ! I recommend it to everyone!! thanks for that free gift ! I'm slowly falling in love here xD keep up the great work!
Thanks Kyle for this wonderful Mongoose Crash Course ❣
🔥🔥🔥
Nobody covered this topic which is very important. Thank you
Thank you so much for your work! Keep up the great effort we all really appreciate it!!!❤❤❤
Hello bro, thank you for this. You deserve everything you wish for 👍
heyo is this tutorial working for you because what i have seen is that the callbacks are deprecated in mongoose now.
Yeah, it worked for me. Some things have changed but I was able to rectify it from the docs.
Thank you, Kyle. That was a really helpful and not a time-consuming tutorial.
it doesn't matter if RUclips took down the dislike button, because I always give this dude a Like
you are awesome... but you are ultimate fast.. I always appreciate your videos... thanks for sharing
That helped me alot in starting a new project in mongoDB.
Your speech is rapid for a non-native English speaker, but the information provided is highly valuable.
Yes!! This is the video I’ve been looking for! Thank you
Great one. So much content in this half hour video.
So well explained! Thank you for this, I can now start using mongoose in my projects!
Meeeeeen i learnt a lot and in the space of 33 minutes... wao thanks and God bless you
thanks, it was really good and quick overview before interview or even before starting out new project. Keep it up
Just what I have been looking for !
Gracias!!!! Estaba luchando con errores, debido a que el curso que estaba siguiendo tenia versiones anteriores, Gracias nuevamente!
Small love from Pakistan hatsoff to you Sir!
Perfectly summarized. Good work Kyle
Man, you're a hero
this vid saved me a lot of time getting into mongoose, tks!!
Kayle, once again, an incredible tutorial. Congratulations. An excellent work. Your tutorials are helping me a lot in my new projects. I haven´t got a formal education in this topic and your work help tremendously. Thank you very much for sharing your knowledge. Thanks again from pakistan. thanks and Best regards Adnan.
You earned our respect bruh, thank you for this amazing content
Your videos are amazing brother , Simplified they are!
I was looking for exactly this. Thanks Kyle.
Very informative video. The one thing I am stuck on is getting the .populate() method to work on an array of object ids.
I've always appreciate you Kyle. you are really awesome;
Hi Kyle that's awesome!. Can you make one video on advanced mongodb modelling, aggregation, and advanced topics like realm, datalake.. ? Thank you!
I wish you were my professor in college 😩 better late than never. Thanks for this tutorial! Super helpful!
So straightforward, even at the end XD
Thank you very much!
This was really an amazing and insightful video Kyle. Thank you for your efforts.
Can you please make a video on how to connect front-end (using React) with back-end (using Express.js and mongoose). Would really appreciate it.
Very good content covering all the fundamentals of Mongoose. Thanks a lot!
Just what I've been waiting for!
Thank you so much Kyle. You have explained very well & Thanks for cheat sheet too.
Damnn! That was a lot of good info just 30 mins! Thanks a ton!
Excellent video! The content was delivered clearly and concisely! Thank you!
Your content is the best on the web.
My head just exploded with so much knowledge !
Thanks for the tutorial 👍
Will watch it bunch of times to get all of it.
How do you remember all of it ? (So much information)
Awesome timing bringing this out
What the.. this tutorial showed up exactly after I struggled with mongoose last night. Perfect timing 🤣
Thanks Kyle for saving my time...great stuff as always..can you please make a video on aggregation framework and how to use it in mongoose?
You're super duper amazing, Kyle
Fantastic effort and work for this video!!
Nice
next level stuff! this guy is something!
Right time, right place! TY
Brilliant🌟, you have cleared my concepts
loved it, advanced topics have been covered with ease❤❤❤
The MongoDB cheat sheet is excellent.
Wow, So cool. Can save so much time. Also cheat sheet.
THanks! keep it up
what a tutorial! so now we need one on Sequelize for sure!!! :)
best crash course for referencing purposes
OMG I love your channel man LOVE it