kla/php-activerecord — Issue #169: SQLite and autoincrement
Author: dfyx
Created: 2011-10-14 09:08:05+00:00
State: open

The SQLite adapter shows some weird behevior when using autoincrement columns.

What happens with php-activerecord (wrong)

INSERT INTO `users`...
-> gets id 9
DELETE FROM `users`WHERE id=9
INSERT INTO `users`...
-> gets id 9 again

What happens with SQLite2009 Pro (correct)

INSERT INTO `users` ...
-> gets id 9
DELETE FROM `users` WHERE id=9
INSERT INTO `users` ...
-> gets id 10

This can cause problems with associations that where (intentionally) not deleted, with links and so on...