NestJS #45 - MongoDB & Mongoose | Discriminators | Schema Inheritance Mechanism | (Hindi)

Опубликовано: 19 Август 2026
на канале: Computer Baba
3,811
77

In this video, we will look into a very special feature of Mongoose which is Discriminator. The Discriminators are a Schema Inheritance Mechanism. They allow us to have multiple models inheriting common fields from a parent schema, and stored under the same MongoDB collection.


▬▬▬▬▬▬ 🔗 Links ▬▬▬▬▬▬

► GitHub (Source code): https://bit.ly/3CG9QAz

► NestJS - Mongoose Schemas :    • NestJS #40 - MongoDB & Mongoose | Schemas ...  


▬▬▬▬▬▬ 📚 CHAPTERS ▬▬▬▬▬▬

00:00 - Introduction
00:42 - Discriminators Concept
01:24 - Student & Employer Schema
03:08 - Discriminator Key on Parent Schema
04:57 - Registering Child Model with Parent Model
06:22 - CRUD - Students & Employers Module
08:09 - Using Child Models - Employers & Student
09:27 - Performing CRUD Operation
11:44 - Mongoose Schema Inheritance vs Prototypal Inheritance (Class Inheritance)
14:06 - Discriminator Key Rules & Constraints
16:52 - Cons of Discriminators
18:13 - Closing notes


▬▬▬▬▬▬ 🔖 RECOMMENDED COURSES ▬▬▬▬▬▬

🎬 Angular In-Depth (Hindi) - https://bit.ly/34nHrBh
🎬 Angular Architecture -    • 1. Angular Architecture | Angular In Depth...  
🎬 NestJS Framework | Backend Development (Hindi) - https://bit.ly/3titPk3
🎬 RxJS - The Practical Guide (Hindi) - https://bit.ly/3GBcXsf
🎬 RxJS - Promise vs Observable | A depth comparison -    • 5. RXJS - Promise vs Observable | A depth ...  
🎬 RxJS - Introduction to Reactive programming -    • 1. RXJS - Introduction to Reactive program...  


▬▬▬▬▬▬ CONNECT WITH ME 👋 ▬▬▬▬▬▬

🐦 Twitter:   / akacomputerbaba  
🏠 Discord: https://bit.ly/3Js25iy
👓 GitHub: https://github.com/cistroncoder
📧 Email: [email protected]

💙 Join this channel
   / computerbabaofficial  


▬▬▬▬▬▬ 🎻 MUSIC ▬▬▬▬▬▬

🎵 Fresh Start - Joakim Karud
https://freesound.org


▬▬▬▬▬▬ # HASHTAGS ▬▬▬▬▬▬

#AmazingNestjs #nestjs #computer_baba #mongodb #mongoose #mongoose_discriminators #mongoose_model #inheritance #schema_desgin #database_schema_design #discriminators #mongoose_schemas #bcrypt #password_hashing #pipes #nestjs_pipes #data_transformation #microservices #dependency_injection #ioc_container #routing #nestjs_project #nodejs #rest_api #http #expressjs #fastify #graphql #mongodb #sql #typeorm #microservices #backend_development #javascript #typescript #rxjs #json