Hi Lukasz,
>>In the previous message you wrote:
>>"Query q = session.createQuery( "select id, description descr, (select
>>max(id) from MySequence) maximum from Product2 "); In this case HQL don't
>>adds the "AS" keyword for the "descr" and "maximum" aliases, so
>>stripAliases->>method & co coul
Hello Steve/Guenther,
@Steve: Thank you for clear explanation. Will create delegate
interface and come back to you. Not sure if it would be backward
compatible, have to check that :).
> This is because HQL apparently does not support the suppression of the "AS"
> keyword for aliases, so this que
Hi Lukasz,
>>Query "select id, description descr, (select max(id) from Product2) maximum
>>from Product2" fails for me (even without paging)
This is because HQL apparently does not support the suppression of the "AS"
keyword for aliases, so this query works only by using the Native-SQL api.
>
So frustrating that we could do this so much cleaner if we were dealing
with syntax trees instead of strings. The dialect could just position
the limit parameter nodes correctly in the tree and that would be that.
Minor, but I'd like to see something other than
bindLimitParametersPreQuery and
Hello Guenther,
I totally agree that user could adapt his query to use "AS" keyword, while we
focus on keeping getLimitString() most fast and
simple as possible.
I think that my modifications are more or less ready and you can view them
here:
https://github.com/lukasz-antoniak/hibernate-core/
Hi Lukasz,
>>...it seems that HQL and Criteria API queries always add an alias to selected
>>column or subquery
While that's true for the cases where hibernate has to exploit the columns
implicitly,
on query projections the user typically defines his own aliases, for example:
Query q = sessio
Hello Guenther,
I have discussed with Strong Liu about aliases and it seems that HQL and
Criteria API queries always add an alias to selected
column or subquery (to @Formula expressions as well). IMO we could assume that
aliases are preceded with "AS" keyword.
Steve agreed to delegate binding
Hi Łukasz,
>> 1. Maybe we could select columns without alias by number instead of adding
>> "pageN" alias?
Yes, that would be really nice, but I really doubt if SQL Server supports such
syntax in the SELECT clause.
>>2. As you mentioned, AS is optional keyword.
Yes, in fact pull-request 349
Two more notes:
1. Maybe we could select columns without alias by number instead of adding
"pageN" alias? Example: "SELECT rid1688_, 2,
deviati16_1688_, 4, sortindex1688_ FROM query WHERE __hibernate_row_nr__ >= ?
AND __hibernate_row_nr__ < ?". Will have to check if
SQL Server supports such syn
Hello Guenther,
The following commit in general describes my thoughts:
https://github.com/lukasz-antoniak/hibernate-core/commit/fa8427937f5751170714ec97ac059bee9efd8cff
It probably needs some more tuning. Feel free to modify and test. I'm not sure
if adding "TOP(100)PERCENT" expression would not
1:56 PM
To: hibernate-dev@lists.jboss.org
Subject: [hibernate-dev] SQLServer getLimitString() refactoring
Hello all,
Release 4.1.4 contained few fixes to
SQLServer2005Dialect#getLimitString(String, boolean) method. The main JIRA
issue (which has links to other related tickets) is HHH-7019.
Quincy L
Hello all,
Release 4.1.4 contained few fixes to
SQLServer2005Dialect#getLimitString(String, boolean) method. The main JIRA
issue (which has
links to other related tickets) is HHH-7019.
Quincy Leung added recently a comment about moving formula expressions to GROUP
BY which causes query to fai
12 matches
Mail list logo