#31894: JSONField filter() and JSONField exclude() are sometimes not inverses of each other -------------------------------------+------------------------------------- Reporter: Mikuael | Owner: Johnny Type: | Pribyl Cleanup/optimization | Status: assigned Component: Documentation | Version: 3.1 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by sage): I think we can change the existing Oracle note about `exclude()` ([https://docs.djangoproject.com/en/3.1/topics/db/queries/#key-index-and- path-transforms here]) to make it more general (not just with `None` rhs) and remove the `Oracle users` note title to just `Note` or `Warning`. Like what Carlton said, it would be great if we also add test cases for that. I think we should also explicitly say that in order to get the proper inverse of `filter()`, users should also consider querying with `__isnull`. -- Ticket URL: <https://code.djangoproject.com/ticket/31894#comment:4> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.c22dade19472a42e091bc07ee403fbae%40djangoproject.com.