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 9, 2021
1 parent f5b805e commit 84d5b7e
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 @@ -430,7 +430,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 84d5b7e

Please sign in to comment.