DDC-2249: Default value sequence #2948

doctrinebot opened this Issue Jan 19, 2013 · 2 comments

2 participants


Jira issue originally created by user mdev:

I want to have a column on a table that by default it takes the value from a sequence.

I've tried to do something like this:
* @ORM\Column(type="integer", unique="true")
* @ORM\GeneratedValue(strategy="SEQUENCE")
* @ORM\SequenceGenerator(sequenceName="seq_categorias", initialValue=1, allocationSize=100)
protected $id_categoria;

But this doesn't work, it creates de sequence but not the link between the table column and the sequence. Is there any possibility to do something like this? Or any autoincrement default value instead?



Comment created by @guilhermeblanco:

We cannot fix this as sequences only work internally in Doctrine for ID fields.


Issue was closed with resolution "Can't Fix"

@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment