def rollback_active_record_state!
      remember_transaction_record_state
      yield
    rescue Exception
      IdentityMap.remove(self) if IdentityMap.enabled?
      restore_transaction_record_state
      raise
    ensure
      clear_transaction_record_state
    end
def rollback_active_record_state!
      remember_transaction_record_state
      yield
    rescue Exception
      IdentityMap.remove(self) if IdentityMap.enabled?
      restore_transaction_record_state
      raise
    ensure
      clear_transaction_record_state
    end
Reset id and @new_record if the transaction rolls back.