Unfortunately, with you first suggestion, my create user operation in part of a larger transaction, and I can't commit the transaction at this point because I haven't finished processing stuff yet. I tried to go the route of you second suggestion, but I'd like to grab the sequence in a little more database invariant manner. I poked around the code a bit, but I couldn't find a simple way to bump sequence value. It would be great if there was a next_value() method on the Sequence object. With this I could: user = User(userDict) user.id = User.mapper.c.id.default.next_value() # do other things.... objectstore.commit() Is there something similar to next_value() out there to easily grab the next sequence value? Aaron On Mar 4, 2006, at 9:08 AM, Alan Franzoni wrote:
Aaron Bickell Research & Development Optio Software, Inc |
- [Sqlalchemy-users] getting the primary key of a new object Aaron Bickell
- [Sqlalchemy-users] Re: getting the primary key of a ne... Alan Franzoni
- Re: [Sqlalchemy-users] Re: getting the primary key... Aaron Bickell
- Re: [Sqlalchemy-users] Re: getting the primary... Jonathan Ellis
- Re: [Sqlalchemy-users] getting the primary key of a ne... Michael Bayer
- Re: [Sqlalchemy-users] getting the primary key of ... Michael Bayer