createSQLQuery - bind wrong value
----------------------------------
Key: HHH-3209
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3209
Project: Hibernate3
Issue Type: Bug
Components: query-sql
Affects Versions: 3.3.0.CR1
Environment: Postrgresql 8.2.6, HB 3.3.0
Reporter: Eugeniusz Neugebauer
I execute SQL query:
SQLQuery query = getSession().createSQLQuery(sql);
query.addEntity(persistentClass);
During execute SQL query:
select * from t1 inner join t2
when some fields in t1 have the same names as from t2,
to persistentClass are bind fields from t2.
In my opinion HB should have throw Exception.
Using alias resolve this problem:
select alt1.* from t1 alt1 inner join t2 alt2
regards
Eugeniusz Neugebauer
--
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