Skip to content

Commit 5761219

Browse files
committed
fix: silly mistake
1 parent f734f10 commit 5761219

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Doctrine/Odm/State/Options.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function getTransformDocument(): mixed
5252

5353
public function withTransformDocument(mixed $transformDocument): self
5454
{
55-
return $this->withTransformModel($transformDocument);
55+
$self = clone $this;
56+
$self->transformModel = $transformDocument;
57+
return $self;
5658
}
5759
}

src/Doctrine/Orm/State/Options.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function getTransformDocument(): mixed
5252

5353
public function withTransformDocument(mixed $transformEntity): self
5454
{
55-
return $this->withTransformModel($transformEntity);
55+
$self = clone $this;
56+
$self->transformModel = $transformEntity;
57+
return $self;
5658
}
5759
}

0 commit comments

Comments
 (0)