[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2583) inconsistency in case sensitivity of dialect registered keywords

Diego Pires Plentz (JIRA) noreply at atlassian.com
Tue Aug 14 16:24:13 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27826 ] 

Diego Pires Plentz commented on HHH-2583:
-----------------------------------------

Hum, I think It isn't a "trivial" issue. Btw, I think that using toLowerCase inside Dialect.registerKeyword() will solve this, or do you know some database that support case sensitive function names?

> inconsistency in case sensitivity of dialect registered keywords
> ----------------------------------------------------------------
>
>                 Key: HHH-2583
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2583
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: documentation, query-hql
>    Affects Versions: 3.2.3
>            Reporter: Pete Cassin
>            Assignee: Diego Pires Plentz
>            Priority: Minor
>
> Right now, the Dialect.registerKeyword() method seems to add a given Keyword to the set as is, without taking the lower case.  This would be fine if the intent was to allow case sensitive keywords, however it becomes problematic when these dialect specified keywords are used by the method Template.isFunctionOrKeyword() - the tokens passed to this method always have toLowerCase() called on them prior to being passed in. 
> Thus, if I create a keyword
> "someKeyword"
> It will never be recognized as such because even if I included it in my hql with identical case,  that method will always be checking the dialect's keyword set for "somekeyword".
> thus, HQL passed into Template.renderWhereStringTemplate will end up incorrectly qualifying the keyword with a table name. 
> This isn't a serious bug by any means, but it may be good to at least note in documentation  that user-specified keywords have to be all lowercase in order to function properly. 

-- 
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