Exactly like that, but the problem is that it throws an update per
record. In cases where there are too many records it'll be slow (Take
for example a list of 100.000 registers to be updated).

I've read that in the queryset-refactor branch is an .update method
for the queryset, but it isn't some workaround (other than raw SQL)
for the current HEAD branch?

Thanks,
Angel

On Mon, Apr 7, 2008 at 12:40 PM, Sebastjan Trepca <[EMAIL PROTECTED]> wrote:
>
>  You mean like
>
>  services = Service.objects.filter(condition)
>  for service in services:
>      ... update the service...
>      service.save()
>
>  ?
>
>  This is quite slow but should work if I understand you correctly.
>
>  Sebastjan
>
>
>
>  On 4/7/08, qwerty <[EMAIL PROTECTED]> wrote:
>  >
>  >  Hi all,
>  >
>  >  I've a models.Model class called it Services with more than 1.000.000
>  >  registers. I need to perform an update on many of those registers
>  >  throw a condition, but I don't want to fallback to raw SQL, is there
>  >  any option of doing this with Django's ORM?
>  >
>  >  Greets,
>  >  Angel
>  >
>  >  >
>  >
>
>
>  --
>  Sebastjan
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to