public function isAttributeChanged($name, $identical = true)
    {
        if ($this->hasAttribute($name) && isset($this->_oldAttributes[$name])) {
            if ($identical) {
                return $this->getAttribute($name) !== $this->_oldAttributes[$name];
            }

            return $this->getAttribute($name) != $this->_oldAttributes[$name];
        }

        return $this->hasAttribute($name) || isset($this->_oldAttributes[$name]);
    }