def atomic_updates(_use_indexes = false)
      process_flagged_destroys
      mods = Modifiers.new
      generate_atomic_updates(mods, self)
      _children.each do |child|
        child.process_flagged_destroys
        generate_atomic_updates(mods, child)
      end
      mods
    end
def atomic_updates(_use_indexes = false)
      process_flagged_destroys
      mods = Modifiers.new
      generate_atomic_updates(mods, self)
      _children.each do |child|
        child.process_flagged_destroys
        generate_atomic_updates(mods, child)
      end
      mods
    end
Get all the atomic updates that need to happen for the current
 +Document+. This includes all changes that need to happen in the
 entire hierarchy that exists below where the save call was made.

 @note MongoDB does not allow "conflicting modifications" to be
   performed in a single operation. Conflicting modifications are
   detected by the 'haveConflictingMod' function in MongoDB.
   Examination of the code suggests that two modifications (a $set
   and a $push with $each, for example) conflict if:
     (1) the key paths being modified are equal.
     (2) one key path is a prefix of the other.
   So a $set of 'addresses.0.street' will conflict with a $push and $each
   to 'addresses', and we will need to split our update into two
   pieces. We do not, however, attempt to match MongoDB's logic
   exactly. Instead, we assume that two updates conflict if the
   first component of the two key paths matches.

 @example Get the updates that need to occur.
   person.atomic_updates(children)

 @return [ Hash ] The updates and their modifiers.

 @since 2.1.0