On Aug 1, 8:35 pm, Nick Johnson <[EMAIL PROTECTED]> wrote:

> Thanks, I'll try that. Is there a way I can do this without locking,
> though, such as by adding my own UPDATE query to the transaction?
>

uh sure probably with a MapperExtension that does an after_update()
for the User mapper...just issues that SQL.

though with that arrangement, you need to be careful that the mapper
doesnt update the column beforehand with the "balance" value on your
User.

Theres a feature we've discussed which is probably the best way to do
this, you'd just say:  user.balance = user_table.c.balance + 1 ...the
mapper intercepts the ClauseElement and uses that as the UPDATE
value.  so maybe ill put that in 0.4.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to