->
leftJoin('customer.paymentData', 'paymentData', Join::WITH, 'paymentData.paymentMean = customer.paymentId'
) ->
leftJoin('billing.attribute', 'billingAttribute'
) ->
leftJoin('customer.defaultShippingAddress', 'shipping'
) ->
leftJoin('shipping.attribute', 'shippingAttribute'
) ->
leftJoin('billing.country', 'billingCountry'
) ->
leftJoin('shipping.country', 'shippingCountry'
) ->
leftJoin('billing.state', 'billingState'
) ->
leftJoin('shipping.state', 'shippingState'
) ->
where('customer.id = ?1'
) ->
setParameter(1,
$id);
$customer =
$builder->
getQuery()->
getOneOrNullResult($this->
getResultMode());
if (!
$customer) { throw new NotFoundException(sprintf('Customer by id %d not found',
$id));
} return $customer;
} /**
* @param int $offset
* @param int $limit
* @param array<string, string>|array<array{property: string, value: mixed, expression?: string}> $criteria
* @param array<array{property: string, direction: string}> $orderBy
*
* @return array{data: array<array<string, mixed>|CustomerModel>, total: int}
*/