Add test for DDC-1156, DDC-1218
This commit is contained in:
parent
a5cddb0c11
commit
fe8b28a09f
@ -100,6 +100,19 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
|
||||
$this->assertTrue(isset($class->fieldMappings['id']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-1156
|
||||
* @group DDC-1218
|
||||
*/
|
||||
public function testGeneratedValueFromMappedSuperclass()
|
||||
{
|
||||
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\SuperclassEntity');
|
||||
/* @var $class ClassMetadataInfo */
|
||||
|
||||
$this->assertInstanceOf('Doctrine\ORM\Id\SequenceGenerator', $class->idGenerator);
|
||||
$this->assertEquals(array('allocationSize' => 1, 'initialValue' => 10, 'sequenceName' => 'foo'), $class->sequenceGeneratorDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
class TransientBaseClass {
|
||||
@ -216,7 +229,7 @@ class SuperclassEntity extends SuperclassBase
|
||||
abstract class SuperclassBase
|
||||
{
|
||||
/**
|
||||
* @Column(type="integer") @Id @GeneratedValue
|
||||
* @Column(type="integer") @Id @GeneratedValue(strategy="SEQUENCE") @SequenceGenerator(sequenceName="foo", initialValue="10")
|
||||
* @var int
|
||||
*/
|
||||
public $id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user