getDefaultQuery example

 {
        $this->connection = $connection;
        $this->esdHydrator = $esdHydrator;
        $this->fieldHelper = $fieldHelper;
    }

    /** * {@inheritdoc} */
    public function loadEsdOfCustomer(int $customerId, int $esdId): Esd
    {
        $query = $this->getDefaultQuery()
            ->setParameter('customerId', $customerId)
            ->setParameter('esdId', $esdId);

        $result = $query->execute()->fetch();

        if (empty($result)) {
            $query = $this->getFallbackQuery()
                ->setParameter('customerId', $customerId)
                ->setParameter('esdId', $esdId);

            $result = $query->execute()->fetch();
        }
Home | Imprint | This part of the site doesn't use cookies.