[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4891) Using certain column names which mirror SQL function names causes "ambiguous column" SQL errors

Manuel Dominguez Sarmiento (JIRA) noreply at atlassian.com
Mon Feb 8 15:38:30 EST 2010


Using certain column names which mirror SQL function names causes "ambiguous column" SQL errors
-----------------------------------------------------------------------------------------------

                 Key: HHH-4891
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4891
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2
         Environment: Error verified with Oracle, MySQL and H2 database engines.
            Reporter: Manuel Dominguez Sarmiento


We have some columns names "floor" and "hash". This used to work fine until 3.5.0 Beta 2. This and later releases fail when a query involves a join with two tables and both each contain a column named either "floor" or "hash" with an "ambiguous column" error.

3.5.0 Beta 1 and previous releases work fine. Something must have changed in Beta 2 that is causing some kind of recognition of SQL function names, but I can't seem to pinpoint any issue related to this in the changelong.

I'm pretty sure this would also happen with other column names such as "ceil", "abs", etc. which although they might be SQL function names they are not reserved keywords, and thus they are valid column names.

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