Skip to content

Commit

Permalink
fix for the failing case
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Jun 19, 2024
1 parent a22feed commit 917163d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -3053,10 +3053,7 @@ public function createEntity($className, array $data, &$hints = [])
} else {
$associatedId[$targetClass->fieldNames[$targetColumn]] = $joinColumnValue;
}
} elseif (
$targetClass->containsForeignIdentifier
&& in_array($targetClass->getFieldForColumn($targetColumn), $targetClass->identifier, true)
) {
} elseif (in_array($targetClass->getFieldForColumn($targetColumn), $targetClass->identifier, true)) {
// the missing key is part of target's entity primary key
$associatedId = [];
break;
Expand Down

0 comments on commit 917163d

Please sign in to comment.