The safety DSL can now be used like so: Person.safely.create(:title => "Sir") person.safely.save! The Safety proxy delegates using method_missing except in the cases of methods that take an attributes hash. This is because we did not want to throw a :safe => true in the hash and then remove it later - safe is too common of a word and could be used as a field/attribute and collide with this functionality. I've deemed the slight duplication acceptable.
…e knows the id changes on next version.
- Mongoid.use_object_ids has now been removed. - Documents now default to using object ids. - Document.indentify :type => String can be used to change id type. - Moved Mongoid.convert_to_object_id to Criteria and renamed to cast_ids(bang) - Removed the double rake run since id configuration is not global anymore.
Document.identity take a Hash of options and the :type option will set the type that the id for the model will be. This will start out by only supporting String and BSON::ObjectID and defaults to the later.
Removes use of ObjectSpace from `rake db:create_indexes`
…. Truth check copied from ActiveRecord
[Resolves github issue #205]
Since a references_many :stored_as => :array association stores the related object ids in an internal collection, setting the inverse association is optional. This allows for one-way referential associations.