mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
error message provides insufficient information for OneToMany with missing mappedBy #5918
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jakumi on GitHub (Mar 13, 2018).
The error message provides only half of the necessary information. It tells which attribute is concerned, but not on which entity, between which two entities, or anything else giving the required hint as to which mapping is wrong.
Adding the
sourceEntityto the error message would provide that missing information and help locate the malformed mapping significantly. used in:43c252458b/lib/Doctrine/ORM/Mapping/ClassMetadata.php (L730)(since the called static function is public, I shy away from providing a pull request)