﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3723	[boulder-oracle] Oracle case insensitive text searches using 'icontains' does not lower case both values before comparison.	Ben Khoo <benk@…>	Adrian Holovaty	"I believe there is an error in the django backend for the keyword 'icontains' when using the Oracle database.

The keyword for 'icontains' is mapped to {{{""LIKE LOWER(%s) ESCAPE '\\'""}}}

The problem is that for a case insensitive text search, both sides of the comparison must be lower cased before the comparison. The way it is implemented currently, it will lower case only one of the values. For example, the query currently being produced is something like 
{{{
SELECT * FROM MYAPPLICATION_PERSON WHERE MYAPPLICATION_PERSON.NAME LIKE LOWER('%Benard%'); 
}}}

instead of

{{{
SELECT * FROM MYAPPLICATION_PERSON WHERE LOWER(MYAPPLICATION_PERSON.NAME) LIKE LOWER('%Benard%'); 
}}}

 I am using the boulder-oracle-sprint branch."		closed	Database layer (models, ORM)	other branch		fixed	Oracle icontains lower		Accepted	0	0	0	0	0	0
