[sqlalchemy] Re: save_or_update() with a unique but not primary key

2007-03-14 Thread Ken Kuhlman
Perhaps he's looking for an upsert function? That's sometimes handy, and to be truly useful would have to be able to use any given key on the table. I hacked up an upsert for SQLObject once, but it was so ugly I never contributed it. It did make the poor man's replication system that I was

[sqlalchemy] Re: save_or_update() with a unique but not primary key

2007-03-13 Thread Sean Davis
On Tuesday 13 March 2007 07:35, Sean Davis wrote: We are creating a database that will have a set of autoincrement primary keys on the tables. However, many of the tables also have one or more unique keys associated with them. Can we use save_or_update() (and, by extension,

[sqlalchemy] Re: save_or_update() with a unique but not primary key

2007-03-13 Thread Michael Bayer
save_or_update() doesnt take any kind of primary key or unique key argument. no specification of anything is needed. Sean Davis wrote: On Tuesday 13 March 2007 07:35, Sean Davis wrote: We are creating a database that will have a set of autoincrement primary keys on the tables. However,