1
0
mirror of synced 2024-12-14 07:06:04 +03:00

check if parent class is a mapped superclass

This commit is contained in:
Fabio B. Silva 2011-09-08 13:41:16 -03:00
parent 7f0275155d
commit 19d0887bb0
3 changed files with 6 additions and 2 deletions

View File

@ -274,7 +274,9 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
$class->setDiscriminatorMap($parent->discriminatorMap); $class->setDiscriminatorMap($parent->discriminatorMap);
$class->setLifecycleCallbacks($parent->lifecycleCallbacks); $class->setLifecycleCallbacks($parent->lifecycleCallbacks);
$class->setChangeTrackingPolicy($parent->changeTrackingPolicy); $class->setChangeTrackingPolicy($parent->changeTrackingPolicy);
$class->setCustomRepositoryClass($parent->customRepositoryClassName); if ($parent->isMappedSuperclass) {
$class->setCustomRepositoryClass($parent->customRepositoryClassName);
}
} }
// Invoke driver // Invoke driver

View File

@ -48,7 +48,8 @@ class DDC869Payment
$metadata->mapField(array( $metadata->mapField(array(
'fieldName' => 'value', 'fieldName' => 'value',
'type' => 'float', 'type' => 'float',
)); ));
$metadata->isMappedSuperclass = true;
$metadata->setCustomRepositoryClass("Doctrine\Tests\Models\DDC869\DDC869PaymentRepository"); $metadata->setCustomRepositoryClass("Doctrine\Tests\Models\DDC869\DDC869PaymentRepository");
$metadata->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadataInfo::GENERATOR_TYPE_AUTO); $metadata->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadataInfo::GENERATOR_TYPE_AUTO);
} }

View File

@ -12,5 +12,6 @@ $metadata->mapField(array(
'fieldName' => 'value', 'fieldName' => 'value',
'type' => 'float', 'type' => 'float',
)); ));
$metadata->isMappedSuperclass = true;
$metadata->setCustomRepositoryClass("Doctrine\Tests\Models\DDC869\DDC869PaymentRepository"); $metadata->setCustomRepositoryClass("Doctrine\Tests\Models\DDC869\DDC869PaymentRepository");
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);