Morphia Java ODM for MongoDB
FAQs
Morphia is a wrapper around the Java driver for MongoDB. It acts as an ODM (Object Document Model) for MongoDB documents. Its original goal was to provide an easy mapping to POJO (Plain Old Java Objects), which the native Java driver now supports. It also offers more advanced features, such as referencing and annotation-based indexing, like Spring Data MongoDB does as well.
An ODM (Object Document Mapping) is to document database what ORM (Object Relational Mapping) is to relational databases. It’s a way to map database documents to native objects that are used in a programming language.
Both Morphia and Spring Data are wrappers around the native Java Driver. If you are familiar with Spring and want to leverage the Spring ecosystem with MongoDB, use Spring Data MongoDB. If you would rather use an official MongoDB driver to connect to your database, use the idiomatic Java driver.
Get started with Atlas today
Get started in seconds. Our free clusters come with 512 MB of storage so you can play around with sample data and get oriented with our platform.
GET STARTED WITH:
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools