mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
$join->setCollection
This commit is contained in:
+11
@@ -99,6 +99,17 @@ class XList extends Action
|
||||
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
|
||||
}
|
||||
|
||||
$joins = Query::getJoinQueries($queries, false);
|
||||
foreach ($joins as $join) {
|
||||
$col = $authorization->skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $join->getCollection()));
|
||||
|
||||
if ($col->isEmpty() || (!$col->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) {
|
||||
throw new Exception($this->getParentNotFoundException(), params: [$join->getCollection()]);
|
||||
}
|
||||
|
||||
$join->setCollection('database_' . $database->getSequence() . '_collection_' . $col->getSequence());
|
||||
}
|
||||
|
||||
$cursor = Query::getCursorQueries($queries, false);
|
||||
$cursor = \reset($cursor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user