#30986 closed Bug (fixed)
Using conditional RawSQL's in QuerySet.filter() crashes on Oracle.
| Reported by: | Mariusz Felisiak | Owned by: | Mariusz Felisiak |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 3.0 |
| Severity: | Release blocker | Keywords: | oracle rawsql |
| Cc: | Simon Charette, Carlton Gibson | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Using conditional RawSQL's in QuerySet.filter() crashes on Oracle, e.g.
Company.objects.filter(
RawSQL('num_employees > %s', (3,), output_field=models.BooleanField()),
)
raises django.db.utils.DatabaseError: ORA-00933: SQL command not properly ended.
This as a release blocker because using conditional expressions in QuerySet.filter() is a new feature added in #25367.
Reported in PR12067.
Note:
See TracTickets
for help on using tickets.
PR