This commit is contained in:
4 files changed
+10
-10
No files matched your search
@@ -29,7 +29,7 @@ class UserInChallengeRepository
|
||||
$select = new Select(\Container::$dbConnection);
|
||||
$select->where('challenge_id', '=', $challenge->getId());
|
||||
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, UserInChallenge::class, true, [User::class]);
|
||||
yield from \Container::$persistentDataManager->selectMultipleFromDb($select, UserInChallenge::class, true, ['user']);
|
||||
}
|
||||
|
||||
public function getByUserIdAndChallenge(int $userId, Challenge $challenge): ?UserInChallenge
|
||||
@@ -44,7 +44,7 @@ class UserInChallengeRepository
|
||||
public function getByUserIdAndToken(int $userId, string $token_str, array $withRelations = []): ?UserInChallenge
|
||||
{
|
||||
if (count($withRelations)) {
|
||||
$necessaryRelations = [Challenge::class];
|
||||
$necessaryRelations = ['challange'];
|
||||
$withRelations = array_unique(array_merge($withRelations, $necessaryRelations));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user