MongoDB ODM with DocumentTS
DocumentTS acts as an ODM, implementing a layer of models to enable rich and customizable interaction with database objects. ODM is the document-based database equivalent of an Object Relational Mapper (ORM) in relational databases. Think of Hibernate or Entity Framework. If you’re not familiar with these concepts, I recommend that you do further research before moving on.
To get started, you can check out the following article, MongoDB ORMs, ODMs, and Libraries, at https://www.mongodb.com/developer/products/mongodb/mongodb-orms-odms-libraries.
At its core, DocumentTS leverages the Node.js driver for MongoDB. The makers of MongoDB implement this driver. It guarantees the best performance and feature parity with new MongoDB releases, whereas third-party libraries often lag in supporting new features. By using the database.getDbInstance
method, you can access the native driver directly. Otherwise, you will access Mongo through the...