Validating uniqueness uses strong consistency.

[ fix #2618 ]
Criteria#type now works with string and symbols.

[ fix #2651 ]
Update autosave documentation to reflect behaviour.

[ fix #2616 ]
Add todo note for #2639
Fix typo [ #2618 ]
Yield in enumerable target post memory set.

This ensures that methods on enumerable that short circuit, like #detect
can be executed again and get the same object in memory.

[ fix #2646 ]
[ #2645 ] - adding cache for count method and changing local methods to use the local count
Refactor and update changelog
Adding note for #2638 for fix later
Fix typo in note
Add note for #2586
Add note for #2586
Ensure no extra queries executed on 1-1 build.

If we have a new parent and a new child, there is no reason to ever
attempt to query the db.

[ fix #2639 ]
Beefing up expectations on eager loading specs
Fix eager loading after calling first or last.

Instead of clearing the inclusions when the criteria has been eager
loaded, we now keep them and track documents that have had their
relations eager loaded individually. This allows multiple first/last
calls not to trigger subsequent db calls, and for iterating over a
criteria's full result set after calling first/last to eager load the
results properly.

[ fix #2638 ]
Add instance level model_name on documents.

[ fix #2661 ]
Allow store_in values to be procs:

Example:

  class Band
    include Mongoid::Document
    store_in database: ->{ Thread.current[:database] }
  end

[ fix #2613 ]
criteria.(new|build|create) now accepts a block.

This behaviour is expected in Mongoid as this is implemented in ActiveRecord
Fixes [ #2668 ]
fixing reversed pattern on specs
Update changelog. [ close #2668 ]