We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 279a8ba commit ed2ccc1Copy full SHA for ed2ccc1
src/Database/Database.php
@@ -4969,7 +4969,6 @@ public function createOrUpdateDocumentsWithIncrease(
4969
throw new AuthorizationException($validator->getDescription());
4970
}
4971
4972
- $createdAt = $document->getCreatedAt();
4973
$updatedAt = $document->getUpdatedAt();
4974
4975
$document
@@ -4978,6 +4977,7 @@ public function createOrUpdateDocumentsWithIncrease(
4978
4977
->setAttribute('$updatedAt', empty($updatedAt) || !$this->preserveDates ? $time : $updatedAt);
4979
4980
if ($old->isEmpty()) {
+ $createdAt = $document->getCreatedAt();
4981
$document->setAttribute('$createdAt', empty($createdAt) || !$this->preserveDates ? $time : $createdAt);
4982
4983
0 commit comments