@@ -1260,7 +1260,7 @@ public function updateCollection(string $id, array $permissions, bool $documentS
12601260
12611261 if (
12621262 $ this ->adapter ->getSharedTables ()
1263- && $ collection ->getAttribute ( ' $tenant ' ) != $ this ->adapter ->getTenant ()
1263+ && $ collection ->getTenant ( ) != = $ this ->adapter ->getTenant ()
12641264 ) {
12651265 throw new NotFoundException ('Collection not found ' );
12661266 }
@@ -1288,13 +1288,11 @@ public function getCollection(string $id): Document
12881288 {
12891289 $ collection = $ this ->silent (fn () => $ this ->getDocument (self ::METADATA , $ id ));
12901290
1291- $ tenant = $ collection ->getAttribute ('$tenant ' );
1292-
12931291 if (
12941292 $ id !== self ::METADATA
12951293 && $ this ->adapter ->getSharedTables ()
1296- && $ tenant !== null
1297- && $ tenant ! = $ this ->adapter ->getTenant ()
1294+ && $ collection -> getTenant () !== null
1295+ && $ collection -> getTenant () != = $ this ->adapter ->getTenant ()
12981296 ) {
12991297 return new Document ();
13001298 }
@@ -1341,7 +1339,7 @@ public function getSizeOfCollection(string $collection): int
13411339 throw new NotFoundException ('Collection not found ' );
13421340 }
13431341
1344- if ($ this ->adapter ->getSharedTables () && $ collection ->getAttribute ( ' $tenant ' ) != $ this ->adapter ->getTenant ()) {
1342+ if ($ this ->adapter ->getSharedTables () && $ collection ->getTenant ( ) != = $ this ->adapter ->getTenant ()) {
13451343 throw new NotFoundException ('Collection not found ' );
13461344 }
13471345
@@ -1367,7 +1365,7 @@ public function getSizeOfCollectionOnDisk(string $collection): int
13671365 throw new NotFoundException ('Collection not found ' );
13681366 }
13691367
1370- if ($ this ->adapter ->getSharedTables () && $ collection ->getAttribute ( ' $tenant ' ) != $ this ->adapter ->getTenant ()) {
1368+ if ($ this ->adapter ->getSharedTables () && $ collection ->getTenant ( ) != = $ this ->adapter ->getTenant ()) {
13711369 throw new NotFoundException ('Collection not found ' );
13721370 }
13731371
@@ -1390,7 +1388,7 @@ public function deleteCollection(string $id): bool
13901388 throw new NotFoundException ('Collection not found ' );
13911389 }
13921390
1393- if ($ this ->adapter ->getSharedTables () && $ collection ->getAttribute ( ' $tenant ' ) != $ this ->adapter ->getTenant ()) {
1391+ if ($ this ->adapter ->getSharedTables () && $ collection ->getTenant ( ) != = $ this ->adapter ->getTenant ()) {
13941392 throw new NotFoundException ('Collection not found ' );
13951393 }
13961394
@@ -3873,7 +3871,7 @@ public function updateDocument(string $collection, string $id, Document $documen
38733871 $ document ['$createdAt ' ] = $ old ->getCreatedAt (); // Make sure user doesn't switch createdAt
38743872
38753873 if ($ this ->adapter ->getSharedTables ()) {
3876- $ document ['$tenant ' ] = $ old ->getAttribute ( ' $tenant ' ); // Make sure user doesn't switch tenant
3874+ $ document ['$tenant ' ] = $ old ->getTenant ( ); // Make sure user doesn't switch tenant
38773875 }
38783876
38793877 $ document = new Document ($ document );
0 commit comments