# File lib/dm-core/resource.rb, line 374
    def dirty_attributes
      dirty_attributes = {}
      properties       = self.properties

      original_values.each do |name, old_value|
        property  = properties[name]
        new_value = property.get!(self)

        dirty = case property.track
        when :hash then old_value != new_value.hash
        else
          property.value(old_value) != property.value(new_value)
        end

        if dirty
          property.hash
          dirty_attributes[property] = property.value(new_value)
        end
      end

      dirty_attributes
    end