# File lib/state_machine/integrations/data_mapper.rb, line 263
      def write(object, attribute, value)
        if attribute == :state
          result = super
          
          # Change original attributes in 0.9.4 - 0.10.2
          if ::DataMapper::VERSION =~ /^0\.9\./
            object.original_values[self.attribute] = "#{value}-ignored" if object.original_values[self.attribute] == value
          elsif ::DataMapper::VERSION =~ /^0\.10\./
            property = owner_class.properties[self.attribute]
            object.original_attributes[property] = "#{value}-ignored" unless object.original_attributes.include?(property)
          else
            object.persisted_state = ::DataMapper::Resource::State::Dirty.new(object) if object.persisted_state.is_a?(::DataMapper::Resource::State::Clean)
            property = owner_class.properties[self.attribute]
            object.persisted_state.original_attributes[property] = value unless object.persisted_state.original_attributes.include?(property)
          end
        else
          result = super
        end
        
        result
      end