/**
* @deprecated - Will be private in Shopware 5.8
* Get documents of a specific type for the given orders
*
* @param int[] $orderIds
* @param string $docType
*
* @return Query<Order>
*/
public function getOrderDocumentsQuery($orderIds,
$docType) { $builder =
$this->
getManager()->
createQueryBuilder();
$builder->
select([ 'orders',
'documents',
]);
$builder->
from(Order::
class, 'orders'
);
$builder->
leftJoin('orders.documents', 'documents'
) ->
where('documents.typeId = :type'
) ->
andWhere('orders.id IN (:orderIds)'
) ->
setParameter('orderIds',
$orderIds, Connection::PARAM_INT_ARRAY
) ->
setParameter(':type',
$docType);