On Sat, May 17, 2008 at 12:10 AM, mwebs <[EMAIL PROTECTED]> wrote: > > News.objects.filter(sequence__gt = msequence).update(sequence = > sequence-1) ... > Is there any possibility to solve this problem without iterating over > all results with News.objects.filter(sequence__gt = msequence) and > setting the new sequence manually in each iteration?
At present, there is no way to do internal references like this (i.e., build a query based on other fields in the same query). There have been some suggestions on how this might be implemented, but in the meantime, the only solution is to use a raw SQL query. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---