create exports via command (#3605)
This commit is contained in:
@@ -57,6 +57,26 @@ class CustomerRepository extends EntityRepository
|
||||
return $customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int[] $customerIDs
|
||||
* @return Customer[]
|
||||
*/
|
||||
public function findByIds(array $customerIDs): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('c');
|
||||
$qb
|
||||
->where($qb->expr()->in('c.id', ':id'))
|
||||
->setParameter('id', $customerIDs)
|
||||
;
|
||||
|
||||
$customers = $qb->getQuery()->getResult();
|
||||
|
||||
$loader = new CustomerLoader($qb->getEntityManager(), true);
|
||||
$loader->loadResults($customers);
|
||||
|
||||
return $customers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Customer $customer
|
||||
* @throws ORMException
|
||||
|
||||
Reference in New Issue
Block a user