…CI is turned off with set_collection_name. Add specs to cover it.
…ollection as their parent. Classes with a different collection name don't need the SCI keys. Ref: https://groups.google.com/forum/?hl=en%3Fhl%3Den#!topic/mongomapper/2ZilWUrlGdw
…. Closes #396.
…d so often. Remove instance #extends. They torch the ruby method cache! This is Very Very Bad. Don't do identity map stuff when the identity map is disabled. Big changes to load behavior to improve load speeds substantially. The big change here is that when loading from the database, we use an #internal_write_key method that isn't eligible for plugins to overwrite. Previously, things like #dirty_key's write_key would be invoked when loading from the DB, which in turn invoked read_key and a whole other chain of things. This massively slowed down read speeds. Other changes have been made to improve internal_write_key. First off, uncast values are now stored in write (by the app, not the DB), and only then from the Rails plugin, as that's the functionality that is concerned with uncast values. It's now a simple hash lookup rather than being a whole mess of ivars. Keys#keys now copies the class.keys to an ivar when it's used. This method is used very frequently, and avoiding the extra function call has substantial benefit when you start adding it up. is_a? was replaced with instance_of? in a number of places; this is faster when you want to compare types directly, rather than the inheritance hierarchiy. We're testing !foo rather than foo.nil? in a number of places for similar reasons. Several tests which were too brittle have been fixed. These changes have resulted in something approaching a 1000% speed increase when reading from the database. Dirty doesn't need initialize_from_database anymore Since MM depends on activesupport already, just go ahead and include the Time.zone patch so we can remove #try Performance improvements to boolean#from_mongo Eliminate a bunch of uninitialized ivar warnings. Slightly improve the runtime of Key#get by avoiding a few method calls. Remove spec that shouldn't have made it into this branch
Allows getting the sci parent and root. Needed for scoped identity map that is shared for sci models.
…odule is deprecated
…stead of to_s as name is used when assignment of _type happens (consistency improvement).