Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 16, 2011
  1. @durran

    Bump version to rc.5

    durran authored
Commits on Jan 15, 2011
  1. @dcu

    use the relationship name as foreign key. this is compatible with pre…

    dcu authored
    …vious versions of mongoid
    
    Signed-off-by: David A. Cuadrado <krawek@gmail.com>
  2. @dcu

    make sure a String is returned as foreign key

    dcu authored
    Signed-off-by: David A. Cuadrado <krawek@gmail.com>
  3. @durran
  4. @durran
  5. @durran

    Relational associations no longer eager load and bind automatically:

    durran authored
    - Up to now on this release candidate, all associations when accessed
      would load and bind their inverses. This caused huge problems when
      trying to do simple scoped database calls that did not need the
      objects in memory on large datasets. (Tested with over a million)
    
    - Methods affected by this performance drag were #count and any criteria
      chain off the association itself.
    
    - From now on by default relational associations are lazy loaded and
      will only load into memory and bind when performing array operations
      on the association that would modify its contents. (<<, push, delete,
      etc.)
    
    - Embedded relations are still eager loaded and bound to their inverses
      on access.
    
    - By providing an :eager => true to the getter or setter for the
      relation, you can force an eager load into memory.
    
    - This commit also fixes all issues with multiple duplicate queries
      running for the relational associations. From now on, once a query has
      been executed for the relation, it will never be executed again while
      the object stays in memory unless a forced reload occurs:
    
      person.reload.posts
      person.posts(true)
    
    - This is also a prep commit for the specific eager loading pull
      request, which will provide the ability to specify an :include to
      eager load specific associations into memory.
Commits on Jan 14, 2011
  1. @durran
Commits on Jan 13, 2011
  1. @durran
  2. @durran
  3. @durran

    Referenced::Many#count and Referenced::ManyToMany#count now properly go

    durran authored
    through the relation criteria and hit the database for the exact count.
    
    - #count will always hit the db, so the number returned may not actually
      match the number of documents in memory if for example a related
      document was persisted by another process.
    
    - Use #size or #length for number of docs in memory.
    
    - Fixes #542.
  4. @durran
  5. @durran
  6. @durran
  7. replSet config

    gilles authored
Commits on Jan 12, 2011
  1. @durran

    Fixing relation alias

    durran authored
  2. @durran

    Bumping to rc.4

    durran authored
  3. @durran

    Changing authors

    durran authored
  4. @durran
  5. @durran
  6. @durran
  7. @durran

    Adding basic Criteria#update and #update_all:

    durran authored
    - At this point will only update all top level documents with an atomic
      $set operation, with :multi => true and whatever safe mode setting was
      defined.
  8. @durran

    Whenever creating a new document via Document#new, never persist the

    durran authored
    child even if provided a persisted parent in the constructor.
  9. @durran
  10. @jasondew @durran

    adding labels to fields. Fixes #485.

    jasondew authored durran committed
  11. @durran
  12. @durran
  13. @vandrijevik @durran

    Make #update_attributes and #update_attributes! work for new records …

    vandrijevik authored durran committed
    …as well.
  14. @durran
  15. @durran
  16. @durran
  17. @durran

    Add a failing spec for testing .=== of Document

    Ivan Ukhov authored durran committed
  18. @durran

    Add a failing spec for testing the ManyToMany relation

    Ivan Ukhov authored durran committed
  19. @durran

    Updating benchmarks for rc.4

    durran authored
  20. @durran
  21. @durran

    Err on the side of less queries instead of an insane number.

    durran authored
    - When binding, eager load the relation once for relational associations
      so that the database query only happens a single time. Otherwise
      multiple duplicate queries would occur.
    
    - Dont set metadata on instantiation of relational associations, defer
      to loading.
    
    - Only embedded relations set metadata on proxy instantiation.
Something went wrong with that request. Please try again.