mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
addJoinCollectionId
This commit is contained in:
1 parent
f76b9a8700
commit
45ce82c5c6
2 files changed
+30
-31
No files matched your search
+4
-4
@@ -101,16 +101,16 @@ class XList extends Action
|
||||
|
||||
$joins = Query::getJoinQueries($queries, false);
|
||||
foreach ($joins as $join) {
|
||||
$col = $authorization->skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $join->getCollection()));
|
||||
$col = $authorization->skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $join->getCollectionId()));
|
||||
|
||||
if ($col->isEmpty() || (!$col->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) {
|
||||
throw new Exception($this->getParentNotFoundException(), params: [$join->getCollection()]);
|
||||
throw new Exception($this->getParentNotFoundException(), params: [$join->getCollectionId()]);
|
||||
}
|
||||
|
||||
$collectionTableId = 'database_' . $database->getSequence() . '_collection_' . $col->getSequence();
|
||||
|
||||
$join->setCollection($collectionTableId);
|
||||
$dbForProject->addJoinCollection($collectionTableId);
|
||||
$join->setCollectionId($collectionTableId);
|
||||
$dbForProject->addJoinCollectionId($collectionTableId);
|
||||
}
|
||||
|
||||
$cursor = Query::getCursorQueries($queries, false);
|
||||
|
||||
Reference in new issue
Block a user