Mike Bernson пишет: > use the lockmode='update' on a query object. > > row_obj = query_obj.select(where, lockmode='update').execute()
self.localTowns = Table('local_towns', self.metadata, Column('id', Integer, primary_key=True), Column('title', Unicode(50)), mysql_engine='InnoDB') self.localTowns.create(checkfirst=True) self.session = create_session() mapper(dbsql.LocalTown, self.localTowns) item = self.session.query(dbsql.LocalTown).with_lockmode('update').execute().selectone(self.localTowns.c.id==itemId) I got this: File "/home/bashu/work/devel/wxExpress/lib/database.py", line 95, in GetLocalTown item = self.session.query(dbsql.LocalTown).with_lockmode('update').execute().selectone(self.localTowns.c.id==itemId) TypeError: execute() takes at least 2 arguments (1 given) -- Basil Shubin Freelance Software Developer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---