Re: [sqlalchemy] Multi-column primary key with autoincrement?

2009-12-16 Thread Adrian von Bidder
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

Re: [sqlalchemy] Multi-column primary key with autoincrement?

2009-12-16 Thread Michael Bayer
Adrian von Bidder wrote: 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.

Re: [sqlalchemy] Multi-column primary key with autoincrement?

2009-12-16 Thread Alex Brasetvik
On Dec 16, 2009, at 09:32 , Adrian von Bidder wrote: sqlite is convenient for development though Except when it *adds* complexity? ;-) -- Alex Brasetvik -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

Re: [sqlalchemy] Multi-column primary key with autoincrement?

2009-12-16 Thread Adrian von Bidder
Heyho! On Wednesday 16 December 2009 16:36:10 Michael Bayer wrote: You need to either use the default keyword and specify a function or SQL expression that will generate new identifiers, or just set up the PK attributes on your new objects before adding them to the session. ... or just

Re: [sqlalchemy] Multi-column primary key with autoincrement?

2009-12-15 Thread Daniel Falk
Adrian von Bidder wrote: Heyho! My small blog-style web site should support article versioning, so: class Entry(DeclarativeBase): id = Column(Integer, autoincrement=True, primary_key=True) version = Column(Integer, primary_key=True, default=0) ... and more stuff (content,

[sqlalchemy] Multi-column primary key with autoincrement?

2009-11-30 Thread Adrian von Bidder
Heyho! My small blog-style web site should support article versioning, so: class Entry(DeclarativeBase): id = Column(Integer, autoincrement=True, primary_key=True) version = Column(Integer, primary_key=True, default=0) ... and more stuff (content, author, ...) it seems

[sqlalchemy] Multi-column primary key

2007-03-12 Thread Mikkel Høgh
Hi there, I'm trying to make a small (open source) inventory tracking system with TurboGears and SQLAlchemy, and I have a little problem with how I should implement the database part. I think the best idea would be to have different sequences for each type of item tracked, so spork number 543