Re: [sqlalchemy] paranoia - does flush ensure a unique id?

2010-09-14 Thread Chris Withers
On 13/09/2010 18:02, Chris Withers wrote: What ensures obj.id will be unique and will it always be unique, even in the case of high volumes of parallel writes to the database? Does it depend on the back end? Are any backends known not to work this way? In short, the unique constrant of the

[sqlalchemy] paranoia - does flush ensure a unique id?

2010-09-13 Thread Chris Withers
Hi All, Give the following model: from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.types import Integer Base = declarative_base() class Model(Base): __tablename__='test' id = Column(Integer, primary_key=True) col = Column(Integer) ...the following code will