上QQ阅读APP看书,第一时间看更新
Mongoid and MongoMapper
It's also important to know about the other Ruby ODMs (Object Document Managers) besides Mongoid. Among the most popular ones out there, is MongoMapper.
- MongoMapper, though older than Mongoid, has a slower evolution cycle. Unlike Mongoid, MongoMapper differentiates between documents and embedded documents.
- MongoMapper uses a non-ActiveModel syntax such as
many
andone
, where Mongoid useshas_many
andhas_one
. - Mongoid has currently become more popular because of its adherence to the Rails ActiveModel and ActiveRelation syntax.
- Mongoid has much better documentation than MongoMapper.