Commits on Sep 14, 2010
  1. Bumping version

    durran committed Sep 14, 2010
  2. Getting working with rails edge

    durran committed Sep 14, 2010
Commits on Sep 13, 2010
  1. Fall back to 1 when revising a version.

    TomK32 committed with jacquescrocker Sep 13, 2010
    In my case I've added Versioning at a later point and old document had no version field
    as this field would be only populated on creating the document
Commits on Aug 31, 2010
  1. do not modify options in place: fixes github #274

    Brian Ledbetter committed with jacquescrocker Aug 30, 2010
  2. Improve splitting of $pushAll to avoid 'have conflict mod' error

    emk committed with jacquescrocker Aug 7, 2010
    Under certain circumstances, Mongoid will generate invalid update
    commands, causing MongoDB to raise an error:
    This error is generally caused by trying to update a field in an
    existing embeds_many document while also trying to push a new document
    onto the same embeds_many array.  For example:
      $set of addresses.0.street
      $pushAll into addresses
    This fails because one key is a prefix of another, and MongoDB can't
    figure out that the updates don't conflict.
    This fix is simple but overly conservative.  It splits the update into
    two whenever a $set and a $pushAll share the same first component.  We
    could obviously mirror MongoDB's actual rule more precisely, but this
    would take quite a bit more Ruby code.
    We include a high-level unit test in persistence_spec which will trigger
    this bug at the MongoDB level.
Commits on Aug 30, 2010
  1. Bumping version to beta 17

    Pairing Workstation Calculon committed Aug 30, 2010
Commits on Aug 24, 2010
Commits on Aug 15, 2010
  1. Update railtie config text for rails3

    bernerdschaefer committed Aug 15, 2010
    It should say "rails generate" instead of "script/rails...".
    Fixes #252
  2. Support hash of safety options for safely methods

    bernerdschaefer committed Aug 15, 2010
    This brings in more support for replica sets, so that on a per query
    basis you can specify the safety assurances you need:
      person.safely(:w => 2, :wtimeout => 1, :fsync => true).save
Commits on Aug 12, 2010
  1. Corrected a typo

    dlt committed with durran Aug 12, 2010
Commits on Aug 10, 2010
  1. Allowing single values to be set in a where clause when the field typ…

    durran committed Aug 10, 2010
    …e is Array. Fixes #244
  2. added Korean locale support

    rdetert committed with durran Aug 10, 2010
Commits on Aug 9, 2010
  1. Fix respond_to? override to be friendly with IRB

    Peter Kieltyka committed with durran Aug 5, 2010
  2. Making mongoid use root namespaced I18n in order not to conflict with…

    durran committed Aug 9, 2010
    … Mongoid::I18n. Fixes #249.
Commits on Aug 8, 2010
  1. Aliasing [] and []= to read_attribute and write_attribute.

    durran committed Aug 8, 2010
    - Makes for a nicer shorthand syntax.
Commits on Aug 7, 2010
  1. Parse Mongoid settings before establishing connection

    jacquescrocker committed Aug 7, 2010
    Some Mongoid settings might want to modify the way connections are set up (e.g. skip_version_check). This change makes sure the Mongoid::Config attributes are set before starting the connection
Commits on Aug 6, 2010
  1. Updating version to beta 16

    durran committed Aug 6, 2010
  2. A slight rewording in the spec

    durran committed Aug 6, 2010
  3. Adding in support for $or queries via Criteria#any_of|or

    durran committed Aug 6, 2010
    Fixes #238.
    - any_of is for readability and not to confuse users when chaining since
      it could appear the or is splitting the entire chain instead of just
      the args passed to the method.
    - Syntax: Person.any_of({ :age => 1 }, { :age => 2 })
  4. Relational association key fields should be typed by the inverse class.

    durran committed Aug 6, 2010
    Fixes #236.
    - Mongoid was improperly looking at the class that the association was
      defined on to check to use object ids or strings, when the actual ids
      were those belonging to the inverse of the relationship. This was
      being exposed in applications that used a combination of object ids
      and strings.
Commits on Aug 5, 2010
  1. Adding in after_initialize callback. Fixes #145.

    durran committed Aug 5, 2010
    - Document#after_initialize will only run after calling
    - The optimized Document.instantiate (for objects loaded from the db)
      does not include this callback.
Commits on Aug 4, 2010
  1. Allow multiple complex criteria in a single hash

    bernerdschaefer committed Aug 4, 2010
    Fixes #172
    - The Hash extension function 'expand_complex_criteria' now uses a
      similar algorithm as chaining 'where' clauses to allow complex
      criteria to be merged. This allows queries like the following to be
        Person.where( => 10, => 20)
  2. Fixed bug where when an object belonged to another in more than one a…

    Matt committed with durran Jul 21, 2010
    …ssociation, the wrong association was sometimes used