Opened 6 years ago
Closed 6 years ago
#29996 closed New feature (invalid)
QuerySet.extra using contains, startswith on integerfield
Reported by: | Austin Fox | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 2.1 |
Severity: | Normal | Keywords: | QuerySet.extra |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Reporting my use as requested in docs https://docs.djangoproject.com/en/2.1/ref/models/querysets/#extra
Maybe I'm doing something strange?
Ex.
qs = qs.extra(where=["foreignkey_id LIKE %s + '%%'"], params=[param])
Change History (1)
comment:1 by , 6 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Description: | modified (diff) |
Resolution: | → invalid |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
You can use a query expression for that. See TicketClosingReasons/UseSupportChannels to get help if the documentation isn't enough.