3 namespace Doctrine\Tests\ORM\Functional;
5 require_once __DIR__ . '/../../TestInit.php';
8 * Description of SequenceGeneratorTest
12 class SequenceGeneratorTest extends \Doctrine\Tests\OrmFunctionalTestCase
14 public function setUp()
18 if (!$this->_em->getConnection()->getDatabasePlatform()->supportsSequences()) {
19 $this->markTestSkipped('Only working for Databases that support sequences.');
23 $this->_schemaTool->createSchema(array(
24 $this->_em->getClassMetadata(__NAMESPACE__ . '\SequenceEntity'),
26 } catch(\Exception $e) {
31 public function testHighAllocationSizeSequence()
33 for ($i = 0; $i < 11; $i++) {
34 $e = new SequenceEntity();
35 $this->_em->persist($e);
48 * @column(type="integer")
49 * @GeneratedValue(strategy="SEQUENCE")
50 * @SequenceGenerator(allocationSize=5,sequenceName="person_id_seq")