MAPG-235 fixed place/map deletion

This commit is contained in:
balazs committed 2021-05-19 16:33:18 +02:00
1 parent 2a1b51b014
commit 517d758e8e
4 files changed
+59 -2

No files matched your search

@@ -17,12 +17,12 @@ class PlaceInChallengeRepository
$this->pdm = new PersistentDataManager();
}
public function getAllByPlace(Place $place) : Generator
public function getAllByPlace(Place $place, array $withRelations = []) : Generator
{
$select = new Select(\Container::$dbConnection);
$select->where('place_id', '=', $place->getId());
yield from $this->pdm->selectMultipleFromDb($select, PlaceInChallenge::class);
yield from $this->pdm->selectMultipleFromDb($select, PlaceInChallenge::class, true, $withRelations);
}
public function getAllByChallenge(Challenge $challenge) : Generator