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 Tim Graham)

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 Tim Graham, 6 years ago

Component: UncategorizedDatabase layer (models, ORM)
Description: modified (diff)
Resolution: invalid
Status: newclosed

You can use a query expression for that. See TicketClosingReasons/UseSupportChannels to get help if the documentation isn't enough.

Note: See TracTickets for help on using tickets.
Back to Top