[FLOW3-general] defone auto_incement on non primary column

Peter Russ peter.russ at 4many.net
Fri Dec 16 10:21:43 CET 2011


--- Original Nachricht ---
Absender:   Robert Lemke
Datum:       16.12.2011 09:07:
> Hi Peter Russ,
>
> On 15.12.2011, at 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.
>
>
> This is not possible – but not due to Doctrine's limitations but due to how auto increments work: MySQL only allows auto increments for primary keys …
>
> Cheers,
> Robert
>

Sorry folks, but that information is not correct.MySql can increment ANY 
column as long as there is an index ;-)
That the way we "fix" it..
But would appreciate a solution that would be supported by doctrine as 
doctrine:update always creates a problem and we have maanually to adjust it.

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