1
0
Fork 0
mirror of synced 2025-04-01 12:26:11 +03:00

DDC-3272 - fixing issue with mapped superclass name, minor refactoring

This commit is contained in:
Marco Pivetta 2014-09-10 17:00:06 +02:00
parent dd9a6bea0a
commit 4974edc70a

View file

@ -875,15 +875,13 @@ public function __construct()
}
}
if ($metadata->isMappedSuperclass) {
$lines[] = ' * @' . $this->annotationsPrefix . 'MappedSuperClass';
} else {
$lines[] = ' * @' . $this->annotationsPrefix . 'Entity';
}
$customRepository = $metadata->customRepositoryClassName
? '(repositoryClass="' . $metadata->customRepositoryClassName . '")'
: '';
if ($metadata->customRepositoryClassName) {
$lines[count($lines) - 1] .= '(repositoryClass="' . $metadata->customRepositoryClassName . '")';
}
$lines[] = ' * @' . $this->annotationsPrefix
. ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity')
. $customRepository;
if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
$lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';