T_User
id   username
1    stliu
2    gail

for example a native query sql "select v1.username, v2.username from T_User v1, 
T_User v2 where v1.id = '1' and v2.id = '2'"

but the query returns ["stliu", "stliu"] instead of the expected ["stliu", 
"gail"]

this is because hibernate uses column alias (in this case, both are "username") 
to get the result from ResultSet, and since the two result in RS are all keyed 
by "username"


should we generate a alias for each like hql does?


-------------------------
Best Regards,

Strong Liu <stliu at hibernate.org>
http://about.me/stliu/bio

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to