Rename table closinmotive

This commit is contained in:
2021-03-30 19:44:48 +02:00
parent 1d6a8987e9
commit a3395895cb
4 changed files with 41 additions and 6 deletions

View File

@@ -44,13 +44,13 @@ class ClosingMotiveRepository extends EntityRepository
$rsm->addRootEntityFromClassMetadata($this->getClassName(), 'cm');
$sql = "SELECT ".(string) $rsm."
FROM chill_person_closingmotive AS cm
FROM chill_person_accompanying_period_closingmotive AS cm
WHERE
active IS TRUE ";
if ($onlyLeaf) {
$sql .= "AND cm.id NOT IN (
SELECT DISTINCT parent_id FROM chill_person_closingmotive WHERE parent_id IS NOT NULL
SELECT DISTINCT parent_id FROM chill_person_accompanying_period_closingmotive WHERE parent_id IS NOT NULL
)";
}