diff --git a/src/Mapping/Driver/AttributeDriver.php b/src/Mapping/Driver/AttributeDriver.php index 6fed1a24e67..9ba3481e3ba 100644 --- a/src/Mapping/Driver/AttributeDriver.php +++ b/src/Mapping/Driver/AttributeDriver.php @@ -390,7 +390,7 @@ public function loadMetadataForClass(string $className, PersistenceClassMetadata $metadata->mapOneToMany($mapping); } elseif ($manyToOneAttribute !== null) { if ($metadata->isEmbeddedClass) { - throw MappingException::invalidAttributeOnEmbeddable($metadata->name, Mapping\OneToMany::class); + throw MappingException::invalidAttributeOnEmbeddable($metadata->name, Mapping\ManyToOne::class); } $idAttribute = $this->reader->getPropertyAttribute($property, Mapping\Id::class);