Heyho! [multi-column primary key where one column is autoincrement int]
On Wednesday 16 December 2009 05.29:54 Daniel Falk wrote: > The true problem here > is with sqlite, which tries to make a "smart" choice about whether to > autoincrement or not. And it gets it wrong. SQLAlchemy is correct to > not specify the id field in the INSERT statement. That's the cue to the > db that it needs to supply that value on its own. Hmm. Closer inspection shows that * sqlite doesn't even support the scenario I want (autoincrement on one column with multi column primary key) and * sqlalchemy doesn't notice this and just creates a two column primary key without autoincrement at all. Is there any hope that sqlalchemy will start to simulate the feature on sqlite? (I'm using the python-pysqlite2 2.5.5-3 / libsqlite3-0 3.6.20-1 / python-sqlalchemy 0.5.6-1 packages from Debian squeeze, btw) I've opened #1642 now. PostgreSQL handles this in just the way I was expecting (no surprise since my expectation on autoincrement columns is derived from the way pg builds its serial data type :-), so I'll have to test if sqlalchemy will do the right thing here. Then I can at least use pg (I was planning to do so in production anyway; sqlite is convenient for development though.) cheers -- vbi -- featured product: GNU Privacy Guard - http://gnupg.org
signature.asc
Description: This is a digitally signed message part.