create exports via command (#3605)
This commit is contained in:
@@ -54,6 +54,26 @@ class TeamRepository extends EntityRepository
|
||||
return $team;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int[] $teamIds
|
||||
* @return Team[]
|
||||
*/
|
||||
public function findByIds(array $teamIds): array
|
||||
{
|
||||
$qb = $this->createQueryBuilder('t');
|
||||
$qb
|
||||
->where($qb->expr()->in('t.id', ':id'))
|
||||
->setParameter('id', $teamIds)
|
||||
;
|
||||
|
||||
$teams = $qb->getQuery()->getResult();
|
||||
|
||||
$loader = new TeamLoader($qb->getEntityManager());
|
||||
$loader->loadResults($teams);
|
||||
|
||||
return $teams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Team $team
|
||||
* @throws ORMException
|
||||
|
||||
Reference in New Issue
Block a user