DDC-2684: SchemaValidator does not correctly validate association mappings target entities #3423

Closed
doctrinebot opened this Issue Sep 17, 2013 · 3 comments

2 participants

@doctrinebot

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

Comment created by @ocramius:

[~jurgenf] the entity may be transient within a single driver, but not necessarily in the entire class metadata factory

@doctrinebot

Comment created by jurgenf:

The problem was in a custom metadata driver that returned the wrong transient state.

@doctrinebot

Issue was closed with resolution "Invalid"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment