Skip to content

Commit a348f89

Browse files
committed
Fix UUID keyGen
1 parent 6759bae commit a348f89

File tree

2 files changed

+4
-36
lines changed

2 files changed

+4
-36
lines changed

docker-compose-image.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/Repository/BaseRepository.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ public function save($model, ?UpdateConstraint $updateConstraint = null)
203203

204204
$primaryKey = $this->repository->getMapper()->getPrimaryKey()[0];
205205

206-
if ($model->{"get$primaryKey"}() instanceof Literal) {
207-
$model->{"set$primaryKey"}(HexUuidLiteral::getUuidFromLiteral($model->{"get$primaryKey"}()));
206+
if ($model->{"get$primaryKey"}() instanceof HexUuidLiteral) {
207+
/** @var HexUuidLiteral $literal */
208+
$literal = $model->{"get$primaryKey"}();
209+
$model->{"set$primaryKey"}($literal->formatUuid());
208210
}
209211

210212
return $model;

0 commit comments

Comments
 (0)