Opened 18 years ago

Last modified 15 years ago

#2170 closed defect

db lookup methods not case sensitive on mysql — at Initial Version

Reported by: derelm Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

i noticed that the methods fieldexact and fieldiexact match case insensitive on mysql
given you have a field (choices=(('a','small a'),('A','capital a'))) fieldexact will always match both choices.

possible solution:
in django.db.backends.mysql.base

OPERATOR_MAPPING = {
    'exact': '= BINARY %s',
    ...
}

oh and will iexact, icontains, istatswith, iendswith all match exactly the same rows anyways?

Change History (0)

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