[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4956?page=c...
]
Maillefer Jean-David edited comment on HHH-4956 at 5/28/11 1:03 PM:
--------------------------------------------------------------------
What do you mean by "Currently" ? A specific version of hibernate ? In my
application, the aliases are correctly identified (thus the workaround works as
expected).
BTW, I think it's a design flaw to internally use column name as column identifier,
since it's often the case to see the same column name occurring many times in a query
(for example, "id" when joining many tables). Is there some plan to correct this
in the (not necessarily near) future ?
was (Author: jidehem):
What do you mean by "Currently" ? A specific version of hibernate ? In my
application, the aliases are correctly identified (thus the work around works as
expected)
Native Query returns wrong results
----------------------------------
Key: HHH-4956
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4956
Project: Hibernate Core
Issue Type: Bug
Components: query-sql
Affects Versions: 3.3.2
Environment: hibernate 3.3.2.GA , linux, oracle 10g, weblogic 10
Reporter: Akashdeep Saddi
Issue: In-case running native queries vai hibernate we have two technical ID's in the
select clause from join of two or more tables the value of all the id's is set to one
value.
Example
A.id = 1
B.id =2
select A.Id as A_ID, B.Id as B_ID from A, B where A.B_id = B.id will return 1,1 in the
result instead of 1,2
Resolution: Use Alias in-case more than one technical keys are part of select clause.
Above query works fine when changed as below
select A.Id , B.Id from A, B where A.B_id = B.id will return 1,2
--
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