Releases: mongodb/mongoid
5.1.5
This patch level release has the following bug fixes:
- MONGOID-4315 Eager load objects when criteria docs are enumerated multiple times
- MONGOID-4350 Fix counter_cache update when foreign_key isn't default (@TheSmartnik)
- MONGOID-4313, MONGOID-4317 Fix Includes throwing NoMethodError when document is nil
- MONGOID-3407 Fix setting a hash field with atomic operator
- Use right database when override_database + options. (@sylvain-8422)
6.0.0
This is the general release of Mongoid 6.0, which supports Rails 5.
Please see the release notes for version 6.0.0.beta and 6.0.0.rc0 for more details on changes since the 5.x series.
Please note that JRuby 9.0 preforms much slower and uses more memory than we've seen with previous JRuby and Mongoid versions. You may want to put off upgrading to JRuby 9.0 + Mongoid 6.0 until the JRuby team has resolved some performance issues. Here is the relevant github issue with the JRuby project.
This release contains the following changes in addition to those list in the beta and rc0 versions of Mongoid 6.0.0.
- Require Ruby driver >= 2.3 so that keys can be validated upon insert.
- MONGOID-3843 Ensure that the output db is queried in mapReduce operations.
- MONGOID-4173 Fix nested eager loading.
- MONGOID-4280 Allow both Strings and Symbols to be used when accessing values in the as_document object.
- MONGOID-4313 Fix nil errors in Eager loading.
- Avoid NoMethodError when using #nested (@quinn)
- Update list of tested Ruby versions in Readme (@tricknotes)
- Documentation updates for 6.0
5.1.4
This patch release has the following bug fixes:
- MONGOID-4300 Don't double set a relation.
- MONGOID-4289 Fix cloning with embedded translations.
- MONGOID-4275 Ensure existing translations are used when a field is localized.
- Criteria#map uses #pluck, not #only (@Benjamin-Dobell)
- MONGOID-4296 Fix regression with #only and embedded fields
- Add mongodb.com docs to repository
6.0.0.rc0
This is the first release candidate of Mongoid 6.0, which supports Rails 5.
The following changes are in rc0, in addition to the changes noted for the 6.0 beta release.
Bug fixes
- MONGOID-4289 Fix cloning with embedded translations (@eric-pigeon)
- MONGOID-4300 Don't double-set a relation
- MONGOID-4304 Accept extra field for association 'touch' option (@duhast)
- Fix hbtm eager loading (@ElMassimo)
API and behavior changes
- MONGOID-4052 #only and #without methods are not scoped to specific locales, unless user explicitly does so. (@johnnyshields)
- Adjust Proxy equality methods (@marshalium)
- Criteria#map uses #pluck, not #only (@Benjamin-Dobell)
Improvements and features
- MONGOID-4301 Support $elemMatch in Matchable#matches? (@jonhyman)
- Make Proxy undef regex more precise (@marshalium)
- Incorporated Mongoid documentation into repository.
- MONGOID-4274 Add QueryChache to the docs and take out Origin references
- Improve test suite performance and ensure that new connections get closed
6.0.0.beta
This is a beta release of Mongoid 6.0, which supports Rails 5.
Mongoid 6.0 has a number of bug fixes, API changes, and improvements:
Bug fixes
- MONGOID-3243 #find_or_create_by does not respect dynamic collection setting.
- MONGOID-3551 Fix adding nested documents to nested relation using accepts_nested_attributes_for
- MONGOID-4228 Fix using $not, $and, $or on embedded document queries. (@jonhyman)
- MONGOID-4241 Only update timestamp when calling #touch, regardless of what other changes are pending. (@connerfritz)
- MONGOID-4272 Fix replacing relation when it is already set as an instance variable.
API and behavior changes
- MONGOID-4268 Mongoid 6 behavior changes
- MONGOID-3535 Don't consider document readonly if #only or #without are used. Allow loaded attributes to be changed.
- MONGOID-3727 Don't mutate criteria object when calling #reorder
- MONGOID-3833 Return false instead of raising an exception when using comparison operators on inappropriate types.
- MONGOID-3944 Support #create_with method.
- MONGOID-4019, MONGOID-4182 Don't include Mongoi::Attributes::Dynamic when cloning documents with unknown attributes.
- MONGOID-4165 Fix inconsistent BigDecimal#mongoize behavior (@johnnyshields)
- MONGOID-4167 Raise an exception if Model#with is called with invalid driver options.
- MONGOID-4175 Add option to include or exclude sort when using #first or #last ( @PedroEscudero and @Juanchote)
- MONGOID-4180 Require a parent for a child in a belongs_to relation.
- MONGOID-4193 Override attributes in criteria's selector with write method's attributes.
- MONGOID-4226 Require ruby > 2.2.2
- MONGOID-4264 Require belongs_to by default and provide options to override requirement.
- MONGOID-4270 Take out run_targeted_callbacks
- MONGOID-4239 Validate field names.
Improvements and features
- MONGOID-4012 Add max_time_ms as an option on Criteria.
- MONGOID-4261, MONGOID-3887 Assign hash attributes in #first_or_* methods on Criteria.
- MONGOID-3074 Consider time zones when returning distinct query results
- MONGOID-3158 DateTime#mongoize and Date#mongoize return nil for invalid strings.
- MONGOID-3842 Allow cache timestamp format to be changed. (@DouweM)
- MONGOID-3875 Note in documentation that Mongoid::Attributes::Dynamic is needed when using counter_cache.
- MONGOID-4129 Close connections opened by calling #with.
- MONGOID-4218 Support Rails 5
- MONGOID-4225 Incorporate separate Origin gem into Mongoid's codebase.
- MONGOID-4266 Support passing multiple contexts to #valid?
- MONGOID-4267 Support #attr_name_previously_changed? and #attr_name_previous_change
- Add sorting options to the cache key (@jefmathiot)
- Don't allow method names containing hyphens (@tdonia)
Closed tickets without fix needed
5.1.3
This patch-level release has the following fixes:
- MONGOID-4260 Respect locale in field predicate methods.
- MONGOID-3735 Allow a relation to be defined as a shard key.
- Fix regression with blank fields (@tagliala)
- Revert MONGOID-3887 because of issue documented in MONGOID-4261
5.1.2
This patch-level release has the following fixes:
- MONGOID-3887 Allow a hash field to be set through criteria create metod.
- MONGOID-4240 Update documentation for Criteria#pluck behavior.
- MONGOID-4246 Properly convert objects related via polymorphic assoc in queries.
- MONGOID-4244 Duplicate of MONGOID-4246.
- MONGOID-3407 Reverted fix from release 5.1.1.
- MONGOID-3930 Confirmed that it's no longer an issue.
- MONGOID-4252 Extract field name from a projection using dot notation.
- MONGOID-4260 Respect localization in predicate method definitions.
- Fix touch to only update timestamp and opt. field (@connerfritz)
5.1.1
This patch-level release has the following changes and fixes:
- Fix for handling $not in $and and $or Matchers (@jonhyman)
- MONGOID-3551 Fix adding documents to nested relation using accepts_nested_attributes_for. (@hck)
- MONGOID-3558 Spec added to show it's no longer an issue.
- MONGOID-4233 Don't override Rails logger levels with Mongoid's config.
- MONGOID-4238 Reset readonly state after reloading document.
- Update the mongoid config template comments to reflect that ssl_verify is on by default. (@danarnold)
5.1.0
This minor release of Mongoid has the following bug fixes and new features:
- MONGOID-3644: Spec added to show it's no longer an issue.
- MONGOID-4196: Ensure use of persistence_options are threadsafe.
- MONGOID-4202: Support using $not in embedded document queries. @jonhyman
- MONGOID-4190: Allow Model#with to accept a block to avoid growing open connections.
- MONGOID-4213: Fix eager loading with deleted HABTM relations
- MONGOID-3758: Spec added to show it's no longer an issue.
- MONGOID-3702: Support finding by JSON-dumped object ids
- MONGOID-3630: Support compacting a document as json
- MONGOID-4211: Fix before/after add callbacks executing when binding one-many relations
- MONGOID-3246: Spec added to show it's no longer an issue
- MONGOID-3565: Duplicate of MONGOID-4211
- MONGOID-3121: Already implemented.
- MONGOID-3895: Support tailable cursors
- MONGOID-3937: Support option to not use fallbacks for a localized field.
- MONGOID-3968: Duplicate of MONGOID-3937
- MONGOID-3776: Support specifying a block as default scope
- MONGOID-3933: Support nesting atomically blocks
- MONGOID-4031: Won't fix; (unwind operator) supported already in driver
- MONGOID-2729: Won't fix; use nullify option
- MONGOID-3944: Support #create_with
- MONGOID-2533: Won't fix
- MONGOID-3522: Support using the $comment query modifer
- MONGOID-4093: Won't fix
- MONGOID-3645: Won't fix
- MONGOID-3739: Default values for inherited models works as designed
- MONGOID-3640: Support text search
- MONGOID-3652: Allow geo near queries in scopes
- MONGOID-3924: Won't fix errors in submodels
- MONGOID-2020: Already implemented in MONGOID-3924
- MONGOID-4173: Support nested eager loading
- MONGOID-3871: Duplicated of MONGOID-4173
- MONGOID-4116: Won't support bulk creation of models
- MONGOID-3277: Won't fix elem_match and atomically
- MONGOID-3885: Won't add controller runtime details
- MONGOID-4220: Update gemspec to require Origin gem >= 2.2
- MONGOID-3882: Update documentation for details regarding using counter_cache and dynamic attributes
- MONGOID-3851: Works as designed.
- MONGOID-3762: Fix polymorphic foreign key conversion
- MONGOID-3693: Duplicate of MONGOID-3762
- MONGOID-3606: Duplicate of MONGOID-3762
- MONGOID-4197: Logger level is configurable in Mongoid config
- MONGOID-4198: Fix chained scopes on Embedded documents
v5.0.2
This release has a number of fixes for bugs in the backlog, community contributions, and tests added to show some issues no longer exist.
- MONGOID-4113 Spec added, no longer an issue
- MONGOID-3659 Spec added, no longer an issue
- MONGOID-3697 Hash.mongoize returns a new hash
- MONGOID-3782 Spec added, no longer an issue
- MONGOID-3709 Support nested polymorphic association assignment
- RUBY-1060 Set mongo logger to mongoid logger
- MONGOID-4137 Fix no method error for 'substitute'
- MONGOID-4128 Don't use $in if 1 subclass in criteria
- MONGOID-3919 Spec added, no longer an issue
- MONGOID-4181 Spec added, no longer an issue
- MONGOID-3808 Don't update db if validation fails
- MONGOID-2984 Don't update db if validation fails
- Remove deprecations form 5.0
- MONGOID-4189 Use index name for comparing text indexes
- RUBY-1072 Add limit of 1 to Model#first and Model#last to avoid leaving cursors open
- MONGOID-3417 Spec added, no longer an issue
- MONGOID-3407 Support using dot notation for attribute assignment (@sivagollapalli)
- Support partial indexes (@amw)