SF Tracker closed
Start looking at ODB Criteria Queries to understand how Criteria Queries work
The equal Criterion used in CriteriaQuery is implemented by org.neodatis.odb.core.query.criteria.EqualCriterion class.
Have a look at the match method that is responsible to return true or false.
The code that do the verification is the last line of the method:
return valueToMatch != null && valueToMatch.equals(criterionValue);
To provide a case insensitive equal, we shoud use the equalsIgnoreCase method instead of equal.
So a way to implement that is to add a boolean attribute on the EqualCriterion class to specify if equal must be used in case sensitive way. This is already done in the org.neodatis.odb.core.query.criteria.LikeCriterion
Then, it will be necessary to add a method iequal on the org.neodatis.odb.core.query.criteria.Restrictions class.
Done?
Not Yet!
Don't forget to add some junits to test this new funcionality (or write them before implementing?) and execute the existing ones!
Junits for CriteriaQuery are located at test/org.neodatis.odb.test.query.criteria.TestCriteriaQuery





