[FLOW3-general] defone auto_incement on non primary column
Peter Russ
peter.russ at 4many.net
Fri Dec 16 11:26:45 CET 2011
--- Original Nachricht ---
Absender: Karsten Dambekalns
Datum: 16.12.2011 11:21:
> 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
Thank you Carsten, will try that!
Peter
--
Fiat lux! Docendo discimus.
_____________________________
uon GbR
http://www.uon.li
http://www.xing.com/profile/Peter_Russ
More information about the FLOW3-general
mailing list