#17877: query.extra(where=...) lack parenthesis ------------------------------------------------+-------------------- Reporter: Marek Brzóska <brzoskamarek@…> | Owner: nobody Type: Bug | Status: new Component: Database layer (models, ORM) | Version: 1.3 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------------------------+-------------------- When using some_query.extra(where="some_code OR more_code") [https://docs.djangoproject.com/en/1.3/ref/models/querysets/#django.db.models.query.QuerySet.extra documentation] says the where-clause will be ANDed with other conditions.
I believe the ANDing part does not surround the user specified where- clause with parenthesis which in this case leads to erroneous code because AND has higher priority than OR. -- Ticket URL: <https://code.djangoproject.com/ticket/17877> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.