[FLOW3-general] defone auto_incement on non primary column
Karsten Dambekalns
karsten at typo3.org
Fri Dec 16 11:21:16 CET 2011
Hi Peter.
On 15.12.11 23:16, Peter Russ wrote:
> I have the following challenge to define an attribute which
> auto_increments but shouldn't be primary key. So far I haven't found a
> way to achive this in Doctrine.
>
> All I can figure out is that this would work with @Id and @GeneratedValue
> But by doing this I would loose the uuid :(
Right, @GeneratedValue cannot be used standalone.
> Any idea how to keep uuid and define an attribute auto_increment with
> Doctrine.
You can use @Table or @Column to add a DQL snippet to add the auto
increment to a column used for a field, see
http://www.doctrine-project.org/docs/orm/2.1/en/reference/annotations-reference.html#annref-column
Regards,
Karsten
More information about the FLOW3-general
mailing list