Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-30 Thread Max Rydahl Andersen
> Well a long term solution is to move to resultset value extraction based on > position rather than name. Which I believe we should do, but it wont happen > any time soon. That would actually fix this problem. Yes, but you would still have the problem then for auto discovered scalar queries

Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-30 Thread Steve Ebersole
Well a long term solution is to move to resultset value extraction based on position rather than name. Which I believe we should do, but it wont happen any time soon. That would actually fix this problem. On Wed 30 Nov 2011 10:57:31 AM CST, Max Rydahl Andersen wrote: > > On Nov 30, 2011, at 1

Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-30 Thread Max Rydahl Andersen
On Nov 30, 2011, at 15:22, Steve Ebersole wrote: > Not sure when you sent this out, but I already fixed this (my) yeasterday. > The only real option, IMO, is to throw an exception. As long as we are tied > to pulling resultset values based on column name this is going to be a > situation tha

Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-30 Thread Steve Ebersole
Not sure when you sent this out, but I already fixed this (my) yeasterday. The only real option, IMO, is to throw an exception. As long as we are tied to pulling resultset values based on column name this is going to be a situation that we simply cannot reasonably support. Modifying the sql

Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-29 Thread Max Rydahl Andersen
> I agree we should not do any magic on a native query; but following > this reasoning just anything should be possible, and I wouldn't expect > Hibernate to apply such magic to the results either. > Why is it even looking at names in the resultset? As a user I'd want > it to just return the same o

Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-29 Thread Sanne Grinovero
I agree we should not do any magic on a native query; but following this reasoning just anything should be possible, and I wouldn't expect Hibernate to apply such magic to the results either. Why is it even looking at names in the resultset? As a user I'd want it to just return the same ordered seq

Re: [hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-29 Thread Max Rydahl Andersen
the original idea of the native sql approach is to avoid/reduce doing anything magical with the query since there is no way to fix these generally without a full sql parser. So I would say it works as expected. /max On Nov 29, 2011, at 11:59, Strong Liu wrote: > T_User > id username > 1s

[hibernate-dev] any suggestion about how to fix HHH-5992?

2011-11-29 Thread Strong Liu
T_User id username 1stliu 2gail 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