Learning Mongoid
上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 and one, where Mongoid uses has_many and has_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.