[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4943) ilike support is incomplete

James Nobis (JIRA) noreply at atlassian.com
Fri Feb 19 18:11:47 EST 2010


ilike support is incomplete
---------------------------

                 Key: HHH-4943
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4943
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.2
         Environment: 3.3.2GA
MySQL/PostgreSQL
            Reporter: James Nobis


ILIKE is currently supported for PostgreSQL in:
hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/IlikeExpression.java:

      if ( dialect instanceof PostgreSQLDialect ) {
         return columns[0] + " ilike ?";
      }
      else {
         return dialect.getLowercaseFunction() + '(' + columns[0] + ") like ?";
      }

      //TODO: get SQL rendering out of this package!

1) This should be in the Dialect
2) PostgreSQL isn't the only DB with ILIKE
3) using instanceof for this is just sloppy
4) this implementation using getLowercaseFunction works with MySQL but fails with DBs like Firebird

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