fix: improve some database queries
This commit is contained in:
@@ -155,8 +155,9 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
return $qb
|
||||
->select('disposition', 'assignment', 'destination')
|
||||
->select('disposition', 'assignment', 'job_profile', 'destination')
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->andX(
|
||||
$qb->expr()->orX(
|
||||
@@ -182,9 +183,11 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
$qb
|
||||
->select('disposition', 'assignment', 'destination', 'feedback', 'teamer')
|
||||
->select('disposition', 'assignment', 'job_profile', 'destination', 'feedback', 'teamer', 'user')
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->innerJoin('disposition.teamer', 'teamer')
|
||||
->innerJoin('teamer.user', 'user')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->leftJoin('disposition.feedback', 'feedback')
|
||||
->where($qb->expr()->andX(
|
||||
@@ -292,10 +295,13 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
return $qb
|
||||
->select('disposition', 'assignment', 'destination', 'document')
|
||||
->select('disposition', 'assignment', 'job_profile', 'destination', 'document', 'teamer', 'user')
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->leftJoin('disposition.documents', 'document')
|
||||
->innerJoin('disposition.teamer', 'teamer')
|
||||
->innerJoin('teamer.user', 'user')
|
||||
->where($qb->expr()->andX(
|
||||
$qb->expr()->lte('disposition.createdAt', ':dueDate'),
|
||||
$qb->expr()->eq('disposition.status', ':status'),
|
||||
|
||||
Reference in New Issue
Block a user