#16211: using negated F()-expression in update query -------------------------------------+------------------------------------- Reporter: wdoekes | Owner: nobody Type: New feature | Status: reopened Component: Database layer | Version: master (models, ORM) | Resolution: Severity: Release blocker | Triage Stage: Ready for Keywords: | checkin Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by akaariai):
* status: closed => reopened * has_patch: 1 => 0 * resolution: fixed => * severity: Normal => Release blocker Comment: It seems I will have to revert this whole commit. The problem is we define '&' and '|' operators as bitwise and / or. But, other operators we define as boolean operators. This means (F('somefield') < 100) & (F'somefield') > 50) doesn't do what one expects, and downright fails on some databases. I can see only one solutions apart of just reverting and wontfixing this issue: Create a subclass of F which redefines what '&' and '|' mean. I will leave this open for a while to see if any ideas pop out. The most likely solution is a revert from 1.5. Then we can revisit this issue for 1.6 and see if we can create something working... This is causing a failure in expressions tests at least on postgres. -- Ticket URL: <https://code.djangoproject.com/ticket/16211#comment:22> 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 https://groups.google.com/groups/opt_out.