Re: [sqlalchemy] forcing an insert

2010-08-03 Thread Michael Bayer
On Aug 3, 2010, at 10:50 AM, Benjamin Peterson wrote: > Is there a way to force the ORM to insert a new row instead of updating? > Something like the must_insert argument to model's save method in Django's > ORM. > The use case is I must create a unique session key (for a cookie) and want an > e

Re: [sqlalchemy] forcing an insert

2010-08-03 Thread Wichert Akkerman
On 8/3/10 16:50 , Benjamin Peterson wrote: Is there a way to force the ORM to insert a new row instead of updating? Something like the must_insert argument to model's save method in Django's ORM. The use case is I must create a unique session key (for a cookie) and want an error when the key isn'

[sqlalchemy] forcing an insert

2010-08-03 Thread Benjamin Peterson
Is there a way to force the ORM to insert a new row instead of updating? Something like the must_insert argument to model's save method in Django's ORM. The use case is I must create a unique session key (for a cookie) and want an error when the key isn't unique, so perhaps there's a better way? -