Skip to content

Commit

Permalink
Merge pull request doctrine#10633 from greg0ire/inspect-owning-side
Browse files Browse the repository at this point in the history
Check only owning relationships
  • Loading branch information
greg0ire authored Apr 15, 2023
2 parents 303baee + ec9e79a commit ada109b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Utility/PersisterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static function getTypeOfColumn(string $columnName, ClassMetadata $class,

// iterate over to-one association mappings
foreach ($class->associationMappings as $assoc) {
if (! $assoc->isToOne()) {
if (! $assoc->isToOneOwningSide()) {
continue;
}

Expand All @@ -85,7 +85,7 @@ public static function getTypeOfColumn(string $columnName, ClassMetadata $class,

// iterate over to-many association mappings
foreach ($class->associationMappings as $assoc) {
if (! $assoc->isToMany()) {
if (! $assoc->isManyToManyOwningSide()) {
continue;
}

Expand Down

0 comments on commit ada109b

Please sign in to comment.