MongoMapper v0.13.0 Release Notes
Release Date: 2014-05-01 // almost 10 years ago-
✨ Enhancements:
* Rails 4 support! [cheald] * Added error message: can't mass assign protected attribute [[email protected]] * Add Integer#from_mongo. [cheald][#533] * Normalize IDs passed to #find!, so that it may accept an unsplatted array of IDs, just like #find. [cheald][#468][#469]. * Performance Improvements to: typecasting, identity map, etc. (see a60b04c) [cheald] * Upgrade safe semantics to be consistent with the new MongoClient safe semantics (:safe => true is now on by default) [cheald] * Various performance fixes mostly related to avoid extraneous method invocation [cheald] * Optimization: use key? [jnunemaker] * Added SSL connection support [[email protected]] * Add automatic id generation when not set (for instance, when calling clone). [[email protected]]
🐛 Bug Fixes:
* validatior#setup is deprecated in activemodel 4.1 [fcheung] * Only add the _type key to inherited classes when they have the same collection as their parent. Classes with a different collection name don't need the SCI keys. [cheald] * remove the _type key when SCI is turned off with set_collection_name. Add specs to cover it. [cheald] * Key serialization mutates model state when using key Array with option typecast [Oktavilla] * Be more clear when specifying which version of JRuby mongo_mapper is tested against [[email protected]] * Fix db:drop to match everything but system exactly [banyan] * Fix rescue responses for rails 3.0 and 3.1 [leifrc] * Use ruby 1.8 syntax for hashes [[email protected]] * Cast data with loaded from an embedded proxy, as embedded proxies may receive their values from uncast sources. [cheald][#536] * Permit suppression of accessor methods via the :accessors option to #key. [cheald][#535] * Guard against failures when the keys are read or written during a hijacked #initialize before we've gotten to run our own #initialize. [pluginaweek][#531] * When performing Time#to_mongo, round times off to milliseconds and discard microseconds. [cheald][#455] * Permit the use of #insert and #update in addition to #save, so that we can catch and raise errors in safe mode. [cheald][#398]. * Add critera_hash when single collection inherited. [cheald][#454] * Fix issues with set_collection_name nullifying SCI on 1.8 [cheald] * Disable SCI when an inherited model explicitly changes its collection. Closes [cheald][#396] * Validate key names. Explicitly disallow keys named `id` since they aren't reachable via plucky due to key normalization. Validate key names via regex. [cheald][#399]. * Don't attempt to create a connection when inheriting classes if one does not already exist. [cheald][#460] * Accept blocks passed to new/build/create/create! on documents and associations. [cheald][#352] * Compact before setting embedded docs on a many association. [cheald][#288] * Limit subclass scopes to subclasses. [cheald][#512] * Update bundler and fix mocha dependency [josevalim] * Fix Ruby 2.0 breakage caused by behavior changes to #respond_to? [cheald][#473] * Don't iterate the whole cursor twice when using IdentityMap with #all. Improve performance by avoiding explicit block bindings, extraneous method calls, and extraneous array creation. [cheald] * Provide a fix for many associations not yielding to each in callbacks. [jnunemaker] * Support non-ObjectID ids being given to modifiers. [jnunemaker] * Inherit connection and database name. Subclasses were not getting these before. Only collection name was inherited. [jnunemaker][#420][#424]
Internals:
* Update travis to test on 2.1.1 [leifcr] * Do not mutate model values using key with typecast [[email protected]] * Setting a key using send should return the new value [tjwp-yesware] * docs fixes [KristineHines, lucianosousa] * Lock timecop to 0.6.1 for Ruby 1.8.7 support [cheald] * Bump plucky requirement to 0.6.5 [cheald] * Add #dynamic_keys and #defined_keys to let developers distinguish defined schema from derived schema. Use a less clever idiom for 1.8-compatible hash filtering. [cheald] * Add key aliasing [cheald] * mongo driver requires that read preference to be type of symbol [[email protected]] * changed deleted cursor.next_object method to cursor.next [jamesbowles] * Use ||= idiom [[email protected]] * Update to latest plucky. [nunemaker] * Added record_timestamps class var to the timestamps plugin [[email protected]] * reverse_merge! -> reverse_merge [nviennot] * Some source files were executable [[email protected]] * Fix legacy mongo class names, that are in deprecation as of 1.8.0. [archSeer] * move delete and destroy methods to Querying::Decorator [[email protected]] * Improvements to key methods (see 942003cca2)[cheald] * Fix travis suport [[email protected]]