[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-995) Order.ignoreCase() only works for VARCHAR types, not CHAR types
Paul Benedict (JIRA)
noreply at atlassian.com
Thu Oct 23 11:52:05 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31518#action_31518 ]
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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list