addJoinCollectionId

This commit is contained in:
fogelito committed 2026-02-10 16:56:38 +02:00
1 parent f76b9a8700
commit 45ce82c5c6
2 files changed
+30 -31

No files matched your search

@@ -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);