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

        $firstPartFactory  = $this->registry->getFactory($spec->getFirstPart());
        $secondPartFactory = $this->registry->getFactory($spec->getSecondPart());

        return $qb->query()->bool()
            ->addShould($firstPartFactory->create($spec->getFirstPart(), $qb))
            ->addShould($secondPartFactory->create($spec->getSecondPart(), $qb))
        ;
    }
public function create(Specification $spec, QueryBuilder $qb)
    {
        if (!$spec instanceof OrX) {
            throw new \InvalidArgumentException();
        }

        $firstPartFactory  = $this->registry->getFactory($spec->getFirstPart());
        $secondPartFactory = $this->registry->getFactory($spec->getSecondPart());

        return $qb->query()->bool()
            ->addShould($firstPartFactory->create($spec->getFirstPart(), $qb))
            ->addShould($secondPartFactory->create($spec->getSecondPart(), $qb))
        ;
    }
{inheritdoc}