Skip to content

Commit a55ef9d

Browse files
abnegateclaude
andcommitted
fix: narrow internal key skip list to only system-managed keys
$updatedAt, $createdAt, $id, $version can be user-controlled and must be compared for change detection. Only skip $internalId, $collection, $tenant, $sequence which are strictly system-managed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 042aa09 commit a55ef9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Database/Traits/Documents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ public function updateDocument(string $collection, string $id, Document $documen
659659
}
660660
}
661661

662-
$internalKeys = ['$id', '$internalId', '$collection', '$createdAt', '$updatedAt', '$tenant', '$sequence', '$version'];
662+
$internalKeys = ['$internalId', '$collection', '$tenant', '$sequence'];
663663

664664
// Compare if the document has any changes
665665
foreach ($document as $key => $value) {

0 commit comments

Comments
 (0)