[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5113?page=c...
]
Gail Badner commented on HHH-5113:
----------------------------------
Hi Thomas,
PropertyProjection.toSqlString(...) was originally using:
criteriaQuery.getColumn(criteria, propertyName)
I changed it to use:
criteriaQuery.getColumns( propertyName, criteria )
to support component properties.
I obviously missed something though.
Can you attach a patch to:
http://anonsvn.jboss.org/repos/hibernate/core/trunk/testsuite/src/test/ja...
that reproduces your issue?
Thanks,
Gail
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
Original Estimate: 0h 1m
Remaining Estimate: 0h 1m
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira