1
0
mirror of synced 2025-01-18 14:31:40 +03:00

[2.0] Fixed issue with namespaces of entities in EntityGenerator

This commit is contained in:
guilhermeblanco 2010-03-28 22:29:29 +00:00
parent 21c1952b89
commit 3a58e14419

View File

@ -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,