public function hasChanged($entity)
    {
        $hashId = $this->getHashId($entity);

        if (!isset($this->originalData[$hashId])) {
            throw new OrmException("Entity is not registered");
        }

        if (isset($this->comparators[get_class($entity)])) {
            return $this->hasChangedUsingComparisonFunction($entity);
        }

        return $this->hasChangedUsingReflection($entity);
    }