#13436: oracle startswith etc fails
------------------------------------------+---------------------------------
Reporter: kthhrv | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.1-beta-1
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
OracleDBModel.objects.filter(name__startswith='abc')
DatabaseError: ORA-01425: escape character must be character string of
length 1
changing
django/db/backends/oracle/base.py
-'startswith': "LIKE TRANSLATE(%s USING NCHAR_CS) ESCAPE TRANSLATE('\\'
USING NCHAR_CS)",
+'startswith': "LIKE %s ESCAPE '\\'",
appears to fix the problem
--
Ticket URL: <http://code.djangoproject.com/ticket/13436>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.