Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 24, 2014
  1. @smtlaissezfaire

    Only partially update objects (using $set and $unset) when updates oc…

    smtlaissezfaire authored
    Note: this does not use ActiveModel::Dirty as ActiveModel::Dirty doesn't find in place changes (such as appending to an array or calling gsub! on a string).
    Partial Updates can be turned on or off per class (by default they are off):
      class Person
        include MongoMapper::Document
        self.partial_updates = false
Commits on Jul 8, 2013
  1. @cheald

    Permit the use of #insert and #update in addition to #save, so that w…

    cheald authored
    …e can catch and raise errors in safe mode. Closes #398.
Commits on Jul 7, 2013
  1. @cheald
Commits on Jul 6, 2013
  1. @cheald

    Add #scoped for AR 3.x parity

    cheald authored
  2. @cheald
Commits on Jul 2, 2013
  1. @cheald

    Minor improvements to type cast speeds. Important since they're calle…

    cheald authored
    …d so often.
    Remove instance #extends. They torch the ruby method cache! This is Very Very Bad. Don't do identity map stuff when the identity map is disabled.
    Big changes to load behavior to improve load speeds substantially.
    The big change here is that when loading from the database, we use
    an #internal_write_key method that isn't eligible for plugins to
    overwrite. Previously, things like #dirty_key's write_key would
    be invoked when loading from the DB, which in turn invoked read_key
    and a whole other chain of things. This massively slowed down read
    Other changes have been made to improve internal_write_key. First off,
    uncast values are now stored in write (by the app, not the DB), and
    only then from the Rails plugin, as that's the functionality that is
    concerned with uncast values. It's now a simple hash lookup rather
    than being a whole mess of ivars.
    Keys#keys now copies the class.keys to an ivar when it's used. This
    method is used very frequently, and avoiding the extra function
    call has substantial benefit when you start adding it up.
    is_a? was replaced with instance_of? in a number of places; this is
    faster when you want to compare types directly, rather than the
    inheritance hierarchiy.
    We're testing !foo rather than foo.nil? in a number of places for
    similar reasons.
    Several tests which were too brittle have been fixed.
    These changes have resulted in something approaching a 1000% speed
    increase when reading from the database.
    Dirty doesn't need initialize_from_database anymore
    Since MM depends on activesupport already, just go ahead and include the patch so we can remove #try
    Performance improvements to boolean#from_mongo
    Eliminate a bunch of uninitialized ivar warnings. Slightly improve the runtime of Key#get by avoiding a few method calls.
    Remove spec that shouldn't have made it into this branch
Commits on Dec 28, 2012
  1. @jnunemaker
  2. @jnunemaker

    Merge branch 'query_methods_match_correct_docs' of…

    jnunemaker authored
    …/balexand/mongomapper into balexand-query_methods_match_correct_docs
Commits on Dec 7, 2012
  1. @cheald

    Upgrade straggler connection references.

    cheald authored
    Upgrade safe semantics to be consistent with the new MongoClient safe semantics - legacy usage (:safe => true) is transparently upgraded to the new system.
    BIG CHANGE: In keeping with the driver defaults, safety is now ON by default (:w => 1) rather than off by default. Use `safe false` to turn off safety in a model.
    Fixed tests.
Commits on Oct 26, 2012
  1. @balexand
Commits on Apr 26, 2012
  1. @brianhempel
Commits on Feb 11, 2012
  1. @brianhempel
  2. @brianhempel

    Delegate :distinct, :size, :reverse, :offset, :order, :empty?, :filte…

    brianhempel authored
    …r, :find_one, :per_page, :ignore, :only to the query.
    A few user problems are fixed by this. To honor unpersisted documents, the methods without arguments (:size and :empty?) need to hit the loaded association array in the ManyDocumentsProxy instead of going to the database...tests updated to reflect this.
Commits on Jan 4, 2012
  1. @laserlemon
Commits on Nov 3, 2011
  1. @brianhempel

    Use plucky 0.4.x, which supports $and queries. (No longer compatible …

    brianhempel authored
    …with < 0.4, plucky changed Query#update to Query#amend)
Commits on May 25, 2011
  1. @bkeepers
Commits on Apr 19, 2011
  1. @jnunemaker
Commits on Mar 20, 2011
  1. @bkeepers

    Use #persisted? instead of #new? internally

    bkeepers authored
    ActiveModel::Lint requires the presence of #persisted?, but not #new?. This allows MM to play nicer with other ActiveModel ORMs (belongs_to should JustWork now with ActiveRecord models).
Commits on Mar 16, 2011
  1. @jnunemaker
Commits on Sep 23, 2010
  1. @bkeepers
Commits on Jun 18, 2010
  1. @jnunemaker

    Scopes and sexy querying now work on many document associations. Had …

    jnunemaker authored
    …to do a lot more work than I was planning on for this.
Commits on Jun 17, 2010
  1. @jnunemaker

    Minor: pull out plucky methods to their own module so they can be inc…

    jnunemaker authored
    …luded in associations as well. Also, less using of full module path for includes and such.
Commits on Jun 16, 2010
  1. @jnunemaker
  2. @jnunemaker
Commits on May 29, 2010
  1. @jnunemaker
Commits on May 28, 2010
  1. @jnunemaker

    Instead of having a MM::Query and delegating all kinds of stuff to a …

    jnunemaker authored
    …Plucky::Query, it makes more sense to decorate the plucky query with the few pieces we need to work differently.
  2. @jnunemaker

    Removed options_hash. Not being used so it is just cruft. Removed som…

    jnunemaker authored
    …e tests that do not really matter.
  3. @jnunemaker
Commits on May 26, 2010
  1. @jnunemaker
  2. @jnunemaker

    Moving @new = false into create_or_update caused nasty stack too deep…

    jnunemaker authored
    … bug in Harmony. Can't replicate or figure out so for now I'll move it back as it hurts nothing.
Commits on May 25, 2010
  1. @jnunemaker
Commits on May 24, 2010
  1. @jnunemaker

    Added safe plugin to Document. Allows you to turn on :safe option for…

    jnunemaker authored
    … all saves using a class method.
    class User
      include MongoMapper::Document
Commits on May 22, 2010
  1. @jnunemaker
Commits on May 21, 2010
  1. @jnunemaker

    Re-introducing MongoMapper::Query but now it just wraps Plucky::Query…

    jnunemaker authored
    … and loads model instances instead of hashes as plucky does.
Commits on May 20, 2010
  1. @jnunemaker

    Document and EmbeddedDocument are now plugins as well. Now the includ…

    jnunemaker authored
    …ing of MM::Document or MM::EmbeddedDocument only call plugins which will make other types of documents easier. Still need to spend some time on the plugin ordering issues.
Something went wrong with that request. Please try again.