Jeff Anderson
[EMAIL PROTECTED] wrote:
Let's say I have a model with an integer value. I'd like to increment that value. Multiple processes would like to increment that value. Does the transaction middleware properly protect against this? Example: Processes P1, P2, model instance m, with m.val - P1 grabs the object : m = MyModel.objects.filter(get the m i want) [0] - P2 grabs the object : m = MyModel.objects.filter(get the m i want) [0] - P1 m.val += 1 - P2 m.val += 1 - P1 m.save() - P2 m.save() What happens normally? What happens with the transaction middleware? What happens if the view is more complicated and only conditionally accesses certain models. Will all models actually accessed be properly locked? Thanks, Ivan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---
signature.asc
Description: OpenPGP digital signature