Fix regression introduced with DDC-1203,DDC-1204 patch
This commit is contained in:
parent
713f4654fd
commit
0cd0ae49a1
@ -281,7 +281,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
|
|||||||
throw MappingException::reflectionFailure($className, $e);
|
throw MappingException::reflectionFailure($className, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($parent) {
|
if ($parent && ! $parent->isMappedSuperclass) {
|
||||||
if ($parent->isIdGeneratorSequence()) {
|
if ($parent->isIdGeneratorSequence()) {
|
||||||
$class->setSequenceGeneratorDefinition($parent->sequenceGeneratorDefinition);
|
$class->setSequenceGeneratorDefinition($parent->sequenceGeneratorDefinition);
|
||||||
} else if ($parent->isIdGeneratorTable()) {
|
} else if ($parent->isIdGeneratorTable()) {
|
||||||
|
@ -89,6 +89,17 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
|
|
||||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyE');
|
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\HierachyE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group DDC-1204
|
||||||
|
* @group DDC-1203
|
||||||
|
*/
|
||||||
|
public function testMappedSuperclassWithId()
|
||||||
|
{
|
||||||
|
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\SuperclassEntity');
|
||||||
|
|
||||||
|
$this->assertTrue(isset($class->fieldMappings['id']));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TransientBaseClass {
|
class TransientBaseClass {
|
||||||
@ -189,4 +200,24 @@ class HierachyE extends HierachyBEntity
|
|||||||
{
|
{
|
||||||
/** @Column(type="string") */
|
/** @Column(type="string") */
|
||||||
public $e;
|
public $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Entity
|
||||||
|
*/
|
||||||
|
class SuperclassEntity extends SuperclassBase
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @MappedSuperclass
|
||||||
|
*/
|
||||||
|
abstract class SuperclassBase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @Column(type="integer") @Id @GeneratedValue
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user