No video

Mastering MongoDB Relationships in Spring Boot: @DBRef Annotation for Seamless Collection Linking!

  Рет қаралды 18,808

Engineering Digest

Engineering Digest

Күн бұрын

🟡 Get 1 to 1 coaching with me: topmate.io/eng...
🟡 Donate: paypal.me/engi...
🟡 Perks: www.youtube.co...
🔴 Instagram: / thevipulvats
🔴 GitHub: github.com/the...
🔴 Twitter: / thevipulvats
🔴 LeetCode: leetcode.com/t...
🔴 LinkedIn: / thevipulvats
🔴 Discord: / discord
🟢 Source code: github.com/cho...
Dive into the world of MongoDB with our comprehensive guide on establishing a seamless connection between two collections using the @DBRef annotation in Spring Boot. Learn the ins and outs of this powerful technique and discover how indexing can enhance performance. Follow along step-by-step to master the art of optimizing your Spring Boot application for efficient data relationships in MongoDB. Elevate your development skills and boost your understanding of database management with this must-watch tutorial!

Пікірлер: 85
@baadal440
@baadal440 Ай бұрын
from your the way you presented yourself in your first video in this playlist i was sure that i found a gem, and i was 100% right on this
@EngineeringDigest
@EngineeringDigest Ай бұрын
Welcome aboard!
@user-rj4tt3nm1v
@user-rj4tt3nm1v 7 ай бұрын
seedhi bat no bakwas, bhai sach maza a rha series follow karke.
@EngineeringDigest
@EngineeringDigest 7 ай бұрын
Please consider sharing feedback on LinkedIn. 🙏🏻
@ayushiagarwal9003
@ayushiagarwal9003 3 ай бұрын
Awesome playlist 👍 Can you please create one for microservices with springboot as well.
@suhasshetty6607
@suhasshetty6607 8 ай бұрын
This is pure gold
@Yaduvanshi-nw3yr
@Yaduvanshi-nw3yr 5 ай бұрын
Aj mai nongodb suru koya hu , to mai yehi soch rha tha ki mai spring boot se array list me item add kaise krunga bahut search krne ke baad apka video mila ☺️☺️
@flutterdevfarm
@flutterdevfarm 9 ай бұрын
Sir, please complete the series with an awesome project specially with mongodb!!❤❤
@pankajdubey1123
@pankajdubey1123 4 ай бұрын
thanks sir for this next level content..... please continue this series for both frontend and backend
@greymatters22
@greymatters22 2 ай бұрын
Sir is it a good design to update user table evrytime a journal entry is made? as explained at 28:00. Having a user id ref in journalentry entity woud be preferrale right? Also given a journal entry we wont be abe to find the associated user
@asaiteja_23
@asaiteja_23 5 ай бұрын
Pure bliss ❤
@devsharma402
@devsharma402 28 күн бұрын
16:05 showing error creating bean with name journalentrycontroller unsatisfied dependency expressed through field journalentryservice cannot resolve refrence to bean mongotemplate while setting bean property mongoOpreations How i resolve it ???😢
@ruman8994
@ruman8994 18 күн бұрын
Same error brother. Do you have it's solution?
@devsharma402
@devsharma402 17 күн бұрын
@@ruman8994 no brother if you get solution plz tell mee
@RohanKumar-uv2dz
@RohanKumar-uv2dz 4 күн бұрын
I got the same error; it got resolved by removing the properties spring.data.mongodb.auto-index-creation=true from application.properties
@ruman8994
@ruman8994 Күн бұрын
Yes bro solved it
@ruman8994
@ruman8994 Күн бұрын
@@devsharma402 yes bro solved it
@RudraStoryTeller
@RudraStoryTeller 3 ай бұрын
@Engineering Digest findByusername in Repo doesn't have an implementation, how does that part work? Maybe I am missing something, could you clarify, please?
@veracious4279
@veracious4279 3 ай бұрын
did your code worked?
@swatisnigdhadash6407
@swatisnigdhadash6407 3 ай бұрын
Did you find any solution
@kartikkatiyar2102
@kartikkatiyar2102 2 ай бұрын
In Spring Data MongoDB, repository interfaces like UserRepository declare query methods by following specific naming conventions. When you define a method like findByUsername(String username) in the UserRepository interface, Spring Data MongoDB automatically generates the implementation for you during runtime. Spring Data MongoDB parses the method name to understand the query you want to execute. In this case, it infers that you want to find a UserEntity by its username field. It generates the appropriate MongoDB query behind the scenes, which would be something like db.userEntity.find({ "username" : username }). This feature of Spring Data, known as Query Creation from Method Names, allows you to write simple and concise repository methods without having to implement them manually. It's a powerful feature that saves developers a lot of time and effort.
@user-vj8vl8yt6q
@user-vj8vl8yt6q 2 ай бұрын
​@@swatisnigdhadash6407try userName - N as capital
@user-vj8vl8yt6q
@user-vj8vl8yt6q 2 ай бұрын
Use capital N
@user13443fg
@user13443fg 5 ай бұрын
@Notnull and @dbref both belongs to different packages.Then how the mongodb knows not to store data if its null.the not null constraint is provided by lombok and have nothing to do with mongodb.
@sanjeevreddyb4537
@sanjeevreddyb4537 9 ай бұрын
Thank you sir learnt a lot from you.. .
@RISHAV25KUMAR
@RISHAV25KUMAR Ай бұрын
Please make playlists : OS, Networks and RDBMS
@codeMantra272
@codeMantra272 3 күн бұрын
Bro me aap se jarur milunga aap acche developer ho ,thankyou for guidence and knowledge (me spring k course offered nahi kr paa rha tha aur aap k way bhi bahut accha hai thankyou so much
@ashokbharadava1184
@ashokbharadava1184 2 ай бұрын
Facing issue: metadata driver not supported annotation Symfony version 6.4 PHP 8.1.25 MongoDB Dll Version 1.19.2 Please help me
@prateekdubey3691
@prateekdubey3691 18 күн бұрын
First of all, thanks a lot for all the efforts bhai!! 29:53 I am trying to make a no-args constructor lekin lag ni raha, because of @NonNull annotation on the title..apka kaisa lag gaya without compilation errors. pls help
@Dark_Dik
@Dark_Dik 8 күн бұрын
Promoted from SD to Sr. SD in while making this playlist is just awesome in previous videos I saw it was SD @TOI now its Sr. SDE @TOI
@learnerboy4405
@learnerboy4405 3 ай бұрын
Can you provide playlist URL? For ease, add it to description.
@subhashisbhowmik7
@subhashisbhowmik7 2 ай бұрын
I just wanted to ask, what about many to many relationships in mongodb, this one just has a one way relationship and one to many, will DBRef work there? How??
@tanmaysenapati1328
@tanmaysenapati1328 2 ай бұрын
getting a error username duplicate key error collection need help
@bpscwala7232
@bpscwala7232 2 ай бұрын
sir please provide us a video on Global exception handling
@Himanshusingh-lj8ku
@Himanshusingh-lj8ku 4 ай бұрын
Mai My Sql se kar raha but yek problem aa raha hamare forigin Key ke aandar null value aa rahi
@user-vx3nm6bh6w
@user-vx3nm6bh6w 2 ай бұрын
Honestly Speaking, This is one of the best course to learn spring boot 🫡 , Amazing Teaching ❤
@user-ws9pp1rc5n
@user-ws9pp1rc5n 2 ай бұрын
Amazing explanation bhai 🥰🥰
@EngineeringDigest
@EngineeringDigest 2 ай бұрын
Thanks brother 😀
@theNEXclip
@theNEXclip 16 күн бұрын
Sir at 40:50 when we replace saveEntry with save, it gives error that "Non-static method 'save(S)' cannot be referenced from a static context" can you please help me at this. Can you please help ??
@sanjaykatta6499
@sanjaykatta6499 3 ай бұрын
why was no args constructor not required when we were creating users and journals separately? there also deserialisation was happening right?
@vanashreebodkhe2502
@vanashreebodkhe2502 3 ай бұрын
did u got the ans?
@sanjaykatta6499
@sanjaykatta6499 3 ай бұрын
@@vanashreebodkhe2502 no bro
@vikasjaiswal1777
@vikasjaiswal1777 4 ай бұрын
JouneralEntry ke issue ka solution kaise find kiye?
@KartikSharma-yh7ou
@KartikSharma-yh7ou Ай бұрын
Even I have given this in my User class: @Indexed(unique = true) @NonNull private String userName; But still while calling POST request, I am able to store on same userName again and again and no error is coming. Does anyone has any idea?
@princekirar4890
@princekirar4890 Ай бұрын
facing same issue did you got the answer ?
@jatinsood9277
@jatinsood9277 20 күн бұрын
same issue
@jatinsood9277
@jatinsood9277 20 күн бұрын
resolved! add @Data annotation on top of your user class
@JagdishDive123
@JagdishDive123 19 күн бұрын
@@jatinsood9277 have done that as well ,But not working . i created index in db . db.users.createIndex({ userName: 1 }, { unique: true }) db.users.getIndexes() and,, @PostMapping public ResponseEntity createUser(@RequestBody User user) { try { if (userRepository.findByUserName(user.getUserName()) != null) { // Return BAD_REQUEST if the username is already taken return new ResponseEntity(HttpStatus.BAD_REQUEST); } userService.saveEntry(user); return new ResponseEntity(user, HttpStatus.CREATED); } catch (Exception e) { return new ResponseEntity(HttpStatus.BAD_REQUEST); } }
@randomstudios4501
@randomstudios4501 21 күн бұрын
Sir in intelliJ it when running the application it is showing the error as : Error starting ApplicationContext. to display the condition evaluation report re-run your application with 'debug' enabled can you please help me with it about how can I solve it
@EngineeringDigest
@EngineeringDigest 21 күн бұрын
It looks like there's an issue with your Spring application's context. To get more details, you can re-run your application with the debug flag enabled. Here's how: 1. Open your application.properties or application.yml file. 2. Add the following line to enable debug logging: logging.level.root=DEBUG 3. Re-run your application. This will provide a detailed evaluation report which should help identify the root cause of the error. Once you have the detailed logs, you can better understand what's causing the issue. If you still need help, feel free to share the logs here!
@randomstudios4501
@randomstudios4501 21 күн бұрын
@@EngineeringDigest tq sir i will look into it
@subhashisbhowmik7
@subhashisbhowmik7 2 ай бұрын
37:00 WOW
@subhashisbhowmik7
@subhashisbhowmik7 2 ай бұрын
33.50 generally we dont give every username which has the particular journal entry to be deleted but we give the journal entry id and it gets deleted from every user->journalEntries so this api design does not make sense how can we do better here?
@EngineeringDigest
@EngineeringDigest 2 ай бұрын
think again
@subhashisbhowmik7
@subhashisbhowmik7 2 ай бұрын
@@EngineeringDigest One possible solution i can think of is getting all those users with the particulat journalId in their journals list then implementing the delete logic both in user and journal se4rvice class Anything else we could do?
@SurajVerma-kk7jp
@SurajVerma-kk7jp 2 ай бұрын
after adding @NoArgsConstructor annotation at 29:46, journal entry in the user database is STILL NOT adding?
@EngineeringDigest
@EngineeringDigest 2 ай бұрын
compare your code with the one on github
@SurajVerma-kk7jp
@SurajVerma-kk7jp Ай бұрын
@@EngineeringDigest Thanks I got my answer
@utkarshshrivastava6571
@utkarshshrivastava6571 Ай бұрын
@@SurajVerma-kk7jp How did your issue get solved bro i am facing same issue and i checked on github but there is complete code not helpful for this
@utkarshshrivastava6571
@utkarshshrivastava6571 Ай бұрын
@@SurajVerma-kk7jp Please help
@utkarshshrivastava6571
@utkarshshrivastava6571 Ай бұрын
@@SurajVerma-kk7jp how did you solve this please let me know i am stuck in this for three days
@Arjun2mkap3929
@Arjun2mkap3929 Ай бұрын
Bhai please teach spring boot with sql because in most of the places sql is used with java and mongodb is used with java script
@Arjun2mkap3929
@Arjun2mkap3929 Ай бұрын
34:00 till typed
@rakshitrawat6113
@rakshitrawat6113 23 күн бұрын
Its confusing as I am trying to learn SpringBoot with Mysqldatabase and you are using MongoDB, Sir please make playlist of SpringBoot with Mysql
@EngineeringDigest
@EngineeringDigest 22 күн бұрын
Thank you for your feedback! I'll definitely consider creating a Spring Boot with MySQL playlist. In the meantime, many concepts from the current series can still apply. Stay tuned for updates!
@rakshitrawat6113
@rakshitrawat6113 18 күн бұрын
@@EngineeringDigest Thank You for replying Sir, waiting for the playlist. :)
@PushpendraKushvaha
@PushpendraKushvaha 4 ай бұрын
how to get previous video of this
@EngineeringDigest
@EngineeringDigest 4 ай бұрын
Check its playlist
@shashanksingh4708
@shashanksingh4708 2 ай бұрын
i didnt understand why we required the Noargsconstructor annotation at 29:36
@EngineeringDigest
@EngineeringDigest 2 ай бұрын
i explained it 2 seconds later
@shashanksingh4708
@shashanksingh4708 2 ай бұрын
@@EngineeringDigest yeah I mean wasn't able to grasp properly ..... Can you elaborate
@Himanshu-vi1jv
@Himanshu-vi1jv 8 ай бұрын
Please video kya aap thoda jaldi dal sakte ho
@Arjun2mkap3929
@Arjun2mkap3929 Ай бұрын
6:12
@baadal440
@baadal440 Ай бұрын
🌟🌟🌟🌟🌟
@theNEXclip
@theNEXclip 16 күн бұрын
Sir at 40:50 when we replace saveEntry with save, it gives error that "Non-static method 'save(S)' cannot be referenced from a static context" can you please help me at this.. Bhai if you know this then please rply
@dProfessor_
@dProfessor_ 9 ай бұрын
SuperBBBBB
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 1,9 МЛН
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 36 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 26 МЛН
Cute kitty gadgets 💛
00:24
TheSoul Music Family
Рет қаралды 12 МЛН
Connecting Spring Boot to MongoDB Atlas: A Step-by-Step Tutorial
10:06
Engineering Digest
Рет қаралды 8 М.
Master External API Integration in Spring Boot: A Step-by-Step Guide
21:15
Spring Security 6 with Spring Boot and JWT Tutorial
3:14:14
Telusko
Рет қаралды 24 М.
Mastering @PostConstruct in Spring Boot: Complete Guide for Developers
20:19
Lookup in Mongodb aggregation
9:47
Hitesh Choudhary
Рет қаралды 18 М.
Spring Events Masterclass | Code Async Listeners in Spring #2
1:47:06
Selenium Express
Рет қаралды 11 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 1,9 МЛН