On Sep 16, 2010, at 10:47 AM, Chris Withers wrote: > On 16/09/2010 14:32, Michael Bayer wrote: >> >>> session imported from Meta ? If use Meta.Session.execute it's returns >>> RowProxy, which has no lastrowid parameter. >> >> execute() does not return a RowProxy. All execute() methods return a >> ResultProxy which consists of metadata about a result as well as an >> interator interface that produces RowProxy instances. > > Right, but I wonder if this mirrors what the OP reports: > > return self.cursor.lastrowid > AttributeError: 'NoneType' object has no attribute 'lastrowid'
thats a bug, a regression introduced in 0.6.4. will fix. execute() still doenst return a RowProxy tho > > >>> type(result) > <class 'sqlalchemy.engine.base.ResultProxy'> > > >>> session.commit() > 2010-09-16 15:43:06,034 INFO sqlalchemy.engine.base.Engine.0x...e610 COMMIT > >>> result.lastrowid > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "SQLAlchemy-0.6.4-py2.6.egg/sqlalchemy/engine/base.py", line 2310, in > lastrowid > return self.cursor.lastrowid > AttributeError: 'NoneType' object has no attribute 'lastrowid' > > I would have thought MySQL would support lastrowid? > > Chris > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.