There seems to be concepts of implementing polymorphism with MongoDB but I can't find any good documentation on how to do it.
Can I do this as part of MongoDB itself - or do I have to model it in Mongoose ( I use Nodejs )
To give an example of the type of data I want to store/ retrieve, I want to store 2 types of products in a product collection. Simple and Grouped.
Both types will have
Grouped products will have
Simple Products will have
Is there a good data modelling program for MongoDB as well?
If someone can point me in the right direction, I don't think I am looking in the right place.
Thanks Martin
Example of usage MongoDb Polymorphism here .
You may find out course "Data Modeling" of MongoDb University helpful. There are lectures "Schema Versioning Pattern" and "Polymorphic Pattern" gives some steps of modeling polymorphism in MongoDb.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.