With TO_MANY relations, class filed is instanceof ArrayCollection,
instead of targetEntity class type.
This commit is contained in:
parent
8f092812c4
commit
be3adfb35e
@ -806,7 +806,12 @@ public function <methodName>()
|
||||
{
|
||||
$lines = array();
|
||||
$lines[] = $this->_spaces . '/**';
|
||||
$lines[] = $this->_spaces . ' * @var ' . $associationMapping['targetEntity'];
|
||||
|
||||
if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
|
||||
$lines[] = $this->_spaces . ' * @var \Doctrine\Common\Collections\ArrayCollection';
|
||||
}else{
|
||||
$lines[] = $this->_spaces . ' * @var ' . $associationMapping['targetEntity'];
|
||||
}
|
||||
|
||||
if ($this->_generateAnnotations) {
|
||||
$lines[] = $this->_spaces . ' *';
|
||||
|
Loading…
x
Reference in New Issue
Block a user