public function create(Specification $spec, QueryBuilder $qb)
    {
        if (!$spec instanceof Not) {
            throw new \InvalidArgumentException();
        }

        $firstPartFactory = $this->registry->getFactory($spec->getWrappedSpecification());

        return $qb->query()->bool()
            ->addMustNot($firstPartFactory->create($spec->getWrappedSpecification(), $qb))
        ;
    }
public function create(Specification $spec, QueryBuilder $qb)
    {
        if (!$spec instanceof Not) {
            throw new \InvalidArgumentException();
        }

        $firstPartFactory = $this->registry->getFactory($spec->getWrappedSpecification());

        return $qb->query()->bool()
            ->addMustNot($firstPartFactory->create($spec->getWrappedSpecification(), $qb))
        ;
    }
{inheritdoc}