Skip to content

Commit b4e2bff

Browse files
abnegateclaude
andcommitted
fix: use adapter idAttributeType for all VAR_ID attributes
Both $tenant and $sequence should validate using the adapter's idAttributeType since tenant can be set to a sequence value. The Sequence validator's UUID7→integer fall-through handles integer values in any adapter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 54e8e36 commit b4e2bff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Database/Validator/Structure.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,7 @@ protected function checkForInvalidAttributeValues(array $structure, array $keys)
340340

341341
switch ($type) {
342342
case Database::VAR_ID:
343-
$idType = ($attribute['$id'] === '$sequence') ? Database::VAR_INTEGER : $this->idAttributeType;
344-
$validators[] = new Sequence($idType, $attribute['$id'] === '$sequence');
343+
$validators[] = new Sequence($this->idAttributeType, $attribute['$id'] === '$sequence');
345344
break;
346345

347346
case Database::VAR_VARCHAR:

0 commit comments

Comments
 (0)