How to use auto incremented id's with MySQL when IDENTITY
strategy is deprecated?
#10739
-
We (and I think many older projects) heavily rely on auto incremented id's on MySQL. We use the Example: #[Entity]
class MyEntity
{
#[Id]
#[Column(name: 'id', type: 'integer')]
#[GeneratedValue(strategy: 'IDENTITY')]
private $id;
} I noticed that since a recent update, this is now marked as deprecated. What is the suggested migration path when on MySQL? It didn't became clear from the issues: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@greg0ire would you happen to know the answer to this? It seems you created the deprecation in 3f84304. Does it mean that |
Beta Was this translation helpful? Give feedback.
So IDENTITY is not deprecated, what is really deprecated is calling
usesSequenceEmulatedIdentityColumns
. Do you confirm that's the deprecation you are getting?