Skip to content

Commit 7802b20

Browse files
committed
[dbal] store string if dbal supports guid natively.
1 parent 3a80860 commit 7802b20

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎pkg/dbal/DbalProducer.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ public function send(PsrDestination $destination, PsrMessage $message)
7575
));
7676
}
7777

78+
$hasNativeGuid = $this->context->getDbalConnection()->getDatabasePlatform()->hasNativeGuidType();
7879
$uuid = Uuid::uuid4();
7980

8081
$dbalMessage = [
81-
'id' => $uuid->getBytes(),
82+
'id' => $hasNativeGuid ? $uuid->toString() : $uuid->getBytes(),
8283
'human_id' => $uuid->toString(),
8384
'published_at' => (int) microtime(true) * 10000,
8485
'body' => $body,

0 commit comments

Comments
 (0)