Skip to content

Commit bc51ecc

Browse files
authored
Do not alter the query when checking associations
1 parent 540292b commit bc51ecc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Listener/JsonApiListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ protected function _getFindResult($subject)
809809
protected function _getSingleEntity($subject)
810810
{
811811
if (!empty($subject->entities)) {
812-
return $subject->entities->first();
812+
return (clone $subject->entities)->first();
813813
}
814814

815815
return $subject->entity;

0 commit comments

Comments
 (0)