Commit 3a58e144 authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Fixed issue with namespaces of entities in EntityGenerator

parent 21c1952b
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment