Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#800 closed defect (fixed)

startswith lookup type does not work with underscore

Reported by: django-form@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Quite strange. Using SQLite 3.2.7, django r1238.

>>> for i in attributes.get_iterator(key__startswith = 'threaded'): print i
... 
threaded_collector.count
>>> for i in attributes.get_iterator(key__startswith = 'threaded_'): print i
... 
>>> 

I also tested with foo_ and foo and it exhibited the same behaviour.

Change History (3)

comment:1 by Adrian Holovaty, 19 years ago

Status: newassigned

This is a SQLite problem...I've reproduced it in upcoming unit tests.

comment:2 by Adrian Holovaty, 19 years ago

(In [1324]) Added unit tests to verify #800. Refs #800

comment:3 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: assignedclosed

(In [1326]) Fixed #800 -- Fixed bug in treatement of underscores and percent signs in SQLite backend. In order to do this, changed OPERATOR_MAPPING in DB backends to include a format string of the field value, because ESCAPE comes after the field value.

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