#5985: ORA-01425: escape character must be character string of length 1
------------------------------------------+---------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Component: Database
wrapper
Version: SVN | Resolution:
Keywords: ORACLE | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------------------+---------------------------------
Comment (by [EMAIL PROTECTED]):
as a remedy, I have changed the file django/db/backends/oracle/base.py and
changed the following
{{{
operators = {
'exact': '= %s',
'iexact': '= UPPER(%s)',
'contains': "LIKE %s ESCAPE '\\'",
'icontains': "LIKE UPPER(%s) ESCAPE '\\'",
'gt': '> %s',
'gte': '>= %s',
'lt': '< %s',
'lte': '<= %s',
'startswith': "LIKE %s ESCAPE '\\'",
'endswith': "LIKE %s ESCAPE '\\'",
'istartswith': "LIKE UPPER(%s) ESCAPE '\\'",
'iendswith': "LIKE UPPER(%s) ESCAPE '\\'",
}
}}}
to
{{{
operators = {
'exact': '= %s',
'iexact': '= UPPER(%s)',
'contains': "LIKE %s",
'icontains': "LIKE UPPER(%s)",
'gt': '> %s',
'gte': '>= %s',
'lt': '< %s',
'lte': '<= %s',
'startswith': "LIKE %s",
'endswith': "LIKE %s",
'istartswith': "LIKE UPPER(%s)",
'iendswith': "LIKE UPPER(%s)",
}
}}}
now count, icontains and all the others work....
--
Ticket URL: <http://code.djangoproject.com/ticket/5985#comment:2>
Django Code <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
-~----------~----~----~----~------~----~------~--~---