Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Mongoid

You're reading from   Learning Mongoid If you know MongoDB and Ruby, then Mongoid is a very handy tool to have at your disposal. Quickly learn to build Rails applications with the helpful code samples and instructions in this book.

Arrow left icon
Product type Paperback
Published in Dec 2013
Publisher Packt
ISBN-13 9781782167501
Length 140 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Gautam Rege Gautam Rege
Author Profile Icon Gautam Rege
Gautam Rege
Arrow right icon
View More author details
Toc

Origins of Origin


Origin is just an extraction of Mongoid's criteria into its own gem. In the extraction, I rewrote most of it since over the last 3 years the criteria had gotten some unsavory code in it. With the rewrite, I was able to add more functionality to it, like alias handling, better attribute serialization, the ability to pass any object with a proper serializer (like a document itself), and custom merge strategies. Plus it has the bonus that anyone who wants to leverage the API can use it, and doesn't have to be using Mongoid. It supports every single possible query operation MongoDB can do, and would be quite useful in other gems that don't necessarily need a full-blown data mapper, but would like the DSL—Durran Jordan, author of Mongoid gem.

This was in March 2012! The thoughts have indeed been noble! Origin has since then evolved tremendously but still boasts of being an independent entity. Origin is not a data mapper but a querying Domain-Specific Language (DSL). What makes...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image