check if parent class is a mapped superclass
This commit is contained in:
parent
7f0275155d
commit
19d0887bb0
@ -274,8 +274,10 @@ 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);
|
||||||
|
if ($parent->isMappedSuperclass) {
|
||||||
$class->setCustomRepositoryClass($parent->customRepositoryClassName);
|
$class->setCustomRepositoryClass($parent->customRepositoryClassName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Invoke driver
|
// Invoke driver
|
||||||
try {
|
try {
|
||||||
|
@ -49,6 +49,7 @@ class DDC869Payment
|
|||||||
'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);
|
||||||
}
|
}
|
||||||
|
@ -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);
|
Loading…
Reference in New Issue
Block a user