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

Pete Cassin (JIRA) noreply at atlassian.com
Fri Apr 20 12:24:04 EDT 2007


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