final public function generateEtag(array $ignoredFields = [])
    {
        if (null === self::$serializer) {
            self::$serializer = new PhpArraySerializer();
        }
        $array = self::$serializer->serialize($this, ['includeAllFields' => true]);

        if (empty($ignoredFields)) {
            return md5(json_encode($array));
        }

        foreach ($ignoredFields as $field) {
            unset($array[$field]);
        }

        return md5(json_encode($array));
    }
final public function generateEtag(array $ignoredFields = [])
    {
        if (null === self::$serializer) {
            self::$serializer = new PhpArraySerializer();
        }
        $array = self::$serializer->serialize($this, ['includeAllFields' => true]);

        if (empty($ignoredFields)) {
            return md5(json_encode($array));
        }

        foreach ($ignoredFields as $field) {
            unset($array[$field]);
        }

        return md5(json_encode($array));
    }
{@inheritdoc}
todo: review performance