[2.0] Fixed issue with namespaces of entities in EntityGenerator
This commit is contained in:
parent
21c1952b89
commit
3a58e14419
@ -527,7 +527,7 @@ public function <methodName>()
|
||||
if ($code = $this->_generateEntityStubMethod($metadata, 'add', $associationMapping->sourceFieldName, $associationMapping->targetEntityName)) {
|
||||
$methods[] = $code;
|
||||
}
|
||||
if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping->sourceFieldName, 'Doctrine\Common\Collections\Collection')) {
|
||||
if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping->sourceFieldName, '\Doctrine\Common\Collections\Collection')) {
|
||||
$methods[] = $code;
|
||||
}
|
||||
}
|
||||
@ -535,7 +535,7 @@ public function <methodName>()
|
||||
if ($code = $this->_generateEntityStubMethod($metadata, 'add', $associationMapping->sourceFieldName, $associationMapping->targetEntityName)) {
|
||||
$methods[] = $code;
|
||||
}
|
||||
if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping->sourceFieldName, 'Doctrine\Common\Collections\Collection')) {
|
||||
if ($code = $this->_generateEntityStubMethod($metadata, 'get', $associationMapping->sourceFieldName, '\Doctrine\Common\Collections\Collection')) {
|
||||
$methods[] = $code;
|
||||
}
|
||||
}
|
||||
@ -600,7 +600,7 @@ public function <methodName>()
|
||||
$variableType = $typeHint ? $typeHint . ' ' : null;
|
||||
|
||||
$types = \Doctrine\DBAL\Types\Type::getTypesMap();
|
||||
$methodTypeHint = $typeHint && ! isset($types[$typeHint]) ? $typeHint . ' ' : null;
|
||||
$methodTypeHint = $typeHint && ! isset($types[$typeHint]) ? '\\' . $typeHint . ' ' : null;
|
||||
|
||||
$replacements = array(
|
||||
'<description>' => ucfirst($type) . ' ' . $fieldName,
|
||||
|
Loading…
x
Reference in New Issue
Block a user