[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5113) Regression in org.hibernate.criterion.PropertyProjection compared to 3.5.0-CR-2

thogau (JIRA) noreply at atlassian.com
Wed Apr 14 09:58:58 EDT 2010


Regression in org.hibernate.criterion.PropertyProjection compared to 3.5.0-CR-2
-------------------------------------------------------------------------------

                 Key: HHH-5113
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5113
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.0-Final
         Environment: mysql 5
            Reporter: thogau


When applying a projection to a criteria query, the SQL generated is something like :

{code}SELECT DISTINCT y0_ AS y0_, y1_ AS y1_ FROM history this_ ORDER BY y1_ ASC{code}

while it was correctly generated in 3.5.0-CR-2 as :

{code}SELECT DISTINCT this_.id AS y0_, this_.attribute AS y1_ FROM history this_ ORDER BY y1_ ASC{code}

I guess there was an autocompletion mistake in line 65 of PropertyProjection.java, the line should be :

{code}String[] cols = criteriaQuery.getColumns( criteria, propertyName );{code}

cheers,

--Thomas

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