Re: [sqlalchemy] autocommit=False, autoflush on begin, after_flush event, unintended side effect?

2012-09-14 Thread Michael Bayer
On Sep 12, 2012, at 11:54 PM, Yap Sok Ann wrote: > This is semi-related to the latest post from Kent. I just noticed that I have > been abusing the "autoflush on begin" behavior (by the _take_snapshot() > method in orm/session.py) to create additional instances within the > after_flush Session

Re: [sqlalchemy] query not working properly with innodb

2012-09-14 Thread Michael Bayer
On Sep 14, 2012, at 4:55 AM, Ranjith Ramachandra wrote: > I am using sqlalchemy as ORM > > I have a class like this: > > class Token(Base): > __tablename__ = 'token_table' > id = Column(Integer, primary_key=True, autoincrement=True) > token = Column(Unicode(300), unique=True) >

[sqlalchemy] query not working properly with innodb

2012-09-14 Thread Ranjith Ramachandra
I am using sqlalchemy as ORM I have a class like this: class Token(Base): __tablename__ = 'token_table' id = Column(Integer, primary_key=True, autoincrement=True) token = Column(Unicode(300), unique=True) last_accessed = Column(DateTime, onupdate=datet