Re: [Sqlalchemy-users] how to get last inserted id with sessions

2006-06-09 Thread Michael Bayer
u.id is the easiest way... On Jun 9, 2006, at 2:15 PM, Valentin Kuznetsov wrote: > Hi, > I'm wondering and cannot figure out how I can get last_inserted_id > when I'm working with sessions. For example I defined table and mapper > to my user class (e.g. User) > > user = Table('user', engine, >

[Sqlalchemy-users] how to get last inserted id with sessions

2006-06-09 Thread Valentin Kuznetsov
Hi, I'm wondering and cannot figure out how I can get last_inserted_id when I'm working with sessions. For example I defined table and mapper to my user class (e.g. User) user = Table('user', engine, Column('id', Integer, primary_key=True, nullable = False), Column('name', Str