Skip to content

Commit

Permalink
Don't remap inherited associations to subclasses when they have alrea…
Browse files Browse the repository at this point in the history
…dy been inherited from elsewhere
  • Loading branch information
mpdude committed Feb 17, 2022
1 parent d33a1c8 commit 75209c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ private function addInheritedRelations(ClassMetadata $subClass, ClassMetadata $p
throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field);
}

$mapping['sourceEntity'] = $subClass->name;
if (! isset($mapping['inherited'])) {
$mapping['sourceEntity'] = $subClass->name;
}
}

//$subclassMapping = $mapping;
Expand Down

0 comments on commit 75209c3

Please sign in to comment.