]
Paul Benedict commented on HHH-995:
-----------------------------------
Please add this to 3.2.x
Order.ignoreCase() only works for VARCHAR types, not CHAR types
---------------------------------------------------------------
Key: HHH-995
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-995
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.1 beta 2
Environment: Database: Ingres
Hibernate: I've actually been using the Order.java from CVS with hibernate 3.0, until
3.1 is released or the ignoreCase version is added to a 3.0 release.
Reporter: Tom Dunstan
Priority: Minor
Attachments: IgnoreCaseCHAR.patch
The case insensitive ordering in org.hibernate.criterion.Order only works for VARCHAR
types, not CHAR types. The attached patch makes it work for both.
I'm not sure how expensive the type.sqlTypes( factory ) lookup is; if it's
expensive you may wish to cache the result since it gets used twice now, which would make
the current (attached) code of:
boolean lower = ignoreCase && type.sqlTypes( factory )[i]==Types.VARCHAR ||
type.sqlTypes( factory )[i]==Types.CHAR;
look more like:
boolean lower;
if(ignoreCase) {
int sqlType = type.sqlTypes( factory )[i];
lower = sqlType == Types.VARCHAR || sqlType == Types.CHAR;
} else {
lower = false;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: