native SQL queries in hibernate not working when using a column more then once using
alias providing different alias name
-----------------------------------------------------------------------------------------------------------------------------
Key: EJB-459
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-459
Project: Hibernate Entity Manager
Issue Type: Bug
Environment: mysql 5.0
EJB 3.0
jboss 4.2.2
Reporter: ashutosh
while using native SQL queries in hibernate
when using aliases to same columns having different name
i am putting a sample query down
select a.area_id as area_id, a.stn_id as stn_id, b.stn_cd AS area_cd , b.stn_nm AS area_nm
, c.stn_cd AS stn_cd ,c.stn_nm AS stn_nm from mst_prncpl_stns a ,mst_stns b, mst_stns
c where a.area_id = b.stn_id AND a.stn_id = c.stn_id
this is returning duplicate result
it should return different result
--
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