Incorporated setAssociationTargetClass, which solves biggest problem of modular system in ZF. Any questions, pelase forward to @EvanDotPro.
This commit is contained in:
parent
cd04cbc7c4
commit
cac9928f28
@ -1849,6 +1849,21 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refine an association targetEntity class pointer to be consumed through loadMetadata event.
|
||||||
|
*
|
||||||
|
* @param string $assoc
|
||||||
|
* @param string $class
|
||||||
|
*/
|
||||||
|
public function setAssociationTargetClass($assocName, $class)
|
||||||
|
{
|
||||||
|
if ( ! isset($this->associationMappings[$assocName])) {
|
||||||
|
throw new \InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->associationMappings[$assocName]['targetEntity'] = $class;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether this class is to be versioned for optimistic locking.
|
* Sets whether this class is to be versioned for optimistic locking.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user