-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLITE Autoincrement #2426
Comments
can you please provide the DDL that was used to create the table? |
This Query will be executed: From this Entity:
The Do you need any more informations? |
The problem may lie in function
It should, IMHO return
|
This also happens in DBAL. So it's not a Doctrine ORM problem, just fyi. Create table code:
Resulting SQL:
|
In case anyone else comes across this bug, this is the workaround I used:
And note that you MUST put integer, primary key, and autoincrement in that particular order or else SQLite will throw an uninformative error. (Error message something like "error near autoincrement.") And also note that you are now adding the PRIMARY KEY directly on the field definition so you have to remove the |
I'm experiencing this issue, too, with sqlite 3. |
Changing the return statement to this works
However this breaks it as it is trying to define the primary key again at the end of the create table statement.
|
Same problem when using a sqlite with phpunit and symfony |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
doctrine: 2.5.4
sqlite: 3
The docs are talking about, that this annotation should result in an SQLITE Autoincrement ID field:
The id is created, but the autoincrement flag is not checked in the sqlitedb..
if i insert an new entity on a fresh db it will have id 1
if i delte this entity and create a new entity afterwards, the new entity will also have the id 1
do i miss somethis or is this a bug in doctrine?
The text was updated successfully, but these errors were encountered: