mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2684: SchemaValidator does not correctly validate association mappings target entities #3363
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 @doctrinebot on GitHub (Sep 17, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user jurgenf:
The schema validator checks if the target entity exists and if the target entity is transient. It does so with the following comparison:
if (!class_exists($assoc['targetEntity']) ](| $cmf->isTransient($assoc['targetEntity')))If I understand this comparison correctly it should evaluate to true if $cmf->isTransient is NOT true because the entity is unknown to the driver in this case. If both the class exists and is a registered entity (is transient) then the association is valid.
@doctrinebot commented on GitHub (Sep 17, 2013):
Comment created by @ocramius:
[~jurgenf] the entity may be transient within a single driver, but not necessarily in the entire class metadata factory
@doctrinebot commented on GitHub (Sep 27, 2013):
Comment created by jurgenf:
The problem was in a custom metadata driver that returned the wrong transient state.
@doctrinebot commented on GitHub (Sep 27, 2013):
Issue was closed with resolution "Invalid"