Permalink
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 Document.new.
    - 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
      executed:
    
        Person.where(:age.gt => 10, :age.lt => 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
  3. String ids getting set on references many as array get converted.

    durran committed Aug 4, 2010
    Fixes #225.
    
    - For situations where string object ids are coming in from forms
      we need to convert them back to object ids if the array is
      marked as an identity array
    - Casting of the object ids was moved out of the optional criterion
      module and into the BSON::ObjectID conversions module.
    - You can now call BSON::ObjectID.cast! with a string, object id,
      array of strings or array of object ids and it will convert
      properly based on the config.
    - Field now stores class information to pass to the setter.
  4. Add #shift method to mongoid contexts

    bernerdschaefer committed Aug 4, 2010
    Calling #shift on a criteria will return the first document and
    increment the current #skip() value.
    
    [resolves github issue #183]
Commits on Aug 3, 2010
  1. API compatibility for destroying associations

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
    Add a _destroy method to documents in rails apps (via Railtie) that
    always returns false. Allows using fields_for to destroy nested
    documents.
    
    [resolves github issue #164]
  2. Allow destroying *_one associations when building

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
  3. Whitespace cleanup

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
  4. Allow order_by on embedded documents

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
    Add support for :sort options to Enumerable context, and add
    Enumerable::Sort class for comparison logic.
    
    [resolves github issue #198]
  5. Cleanup: use let instead of instance variables

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
  6. Cleanup: use let instead of instance variables

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
  7. Handle empty strings when setting ObjectID

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
  8. Whitespace cleanup

    Bernerd Schaefer and Veezus Kreist committed with Pairing Workstation Hancock Aug 3, 2010
  9. Don't filter by _type when querying root document

    bernerdschaefer committed Aug 3, 2010
    Use hereditary? method which checks the superclass instead of a
    cattr_accessor.
    
    [resolves github issue #131]
  10. Documentation fix

    bernerdschaefer committed Aug 3, 2010