def modifications
      @accessed.each_pair do |field, value|
        current = @attributes[field]
        if current != value || (current.is_a?(Array) &&
            current.any? { |v| v.respond_to?(:changed?) && v.changed? })
          @modifications[field] = [ value, current ]
        end
      end
      @accessed.clear
      @modifications
    end
def modifications
      @accessed.each_pair do |field, value|
        current = @attributes[field]
        if current != value || (current.is_a?(Array) &&
            current.any? { |v| v.respond_to?(:changed?) && v.changed? })
          @modifications[field] = [ value, current ]
        end
      end
      @accessed.clear
      @modifications
    end
Get all normal modifications plus in place potential changes.
 Also checks changes in array attributes with +Element+ objects.

 Example:

 <tt>person.modifications</tt>

 Returns:

 All changes to the document.