if (empty($result)) { throw new EsdNotFoundException();
} return $this->esdHydrator->
hydrate($result);
} protected function getDefaultQuery(): QueryBuilder
{ return $this->connection->
createQueryBuilder() ->
addSelect($this->fieldHelper->
getEsdFields()) ->
from('s_articles_esd', 'esd'
) ->
innerJoin('esd', 's_order_esd', 'orderEsd', 'esd.id = orderEsd.esdID'
) ->
leftJoin('esd', 's_articles_esd_attributes', 'esdAttribute', 'esd.id = esdAttribute.esdID'
) ->
andWhere('orderEsd.userID = :customerId'
) ->
andWhere('orderEsd.orderdetailsID = :esdId'
) ;
} protected function getFallbackQuery(): QueryBuilder
{ return $this->connection->
createQueryBuilder()