We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 453cd2b commit 24f97a1Copy full SHA for 24f97a1
1 file changed
src/Database/Database.php
@@ -4703,6 +4703,9 @@ public function createOrUpdateDocumentsWithIncrease(
4703
if ($document->getTenant() === null) {
4704
throw new DatabaseException('Missing tenant. Tenant must be set when tenant per document is enabled.');
4705
}
4706
+ if (!$old->isEmpty() && $old->getTenant() !== $document->getTenant()) {
4707
+ throw new DatabaseException('Tenant cannot be changed.');
4708
+ }
4709
} else {
4710
$document->setAttribute('$tenant', $this->adapter->getTenant());
4711
0 commit comments