Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mongoid ate my homework


Published on

My talk about Mongoid for RORO Syd.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Mongoid ate my homework

  1. 1. Mongoid Ate My Homework 10 quick gotchas from using mongoid in production. - Jude
  2. 2. I’m @slowjud on everything (twitter/github) I work at SplitIt. We run We run We run We run
  3. 3. Gratuitous bike porn
  4. 4. Now for my talk
  5. 5. MongoDB is not relational
  6. 6. MongoDB only uses one index per query
  7. 7. Nil does not unset a field
  8. 8. Nil is not the opposite of exist
  9. 9. BigDecimal type sorts alphabetically
  10. 10. Embedded objects must have an embedded_in declared
  11. 11. Indexes don’t get created on embedded objects
  12. 12. Scopes should go on the parent object
  13. 13. Callbacks on embedded objects are not run by default
  14. 14. Don’t try and perform two atomic operations on the same field in the same call
  15. 15. Questions?
  16. 16. Gists Slides: The good models: The bad models: All of the queries:
  17. 17. Thank You