tenwit wrote:
That looks like a report query, is it? Are you trying to build objects out of the result set, or just get scalars? If it's just a report, convert it to an sql-query and all will be well.
Hi thanks 4 ur support but it is not a report query... this query is generated at run time... actually we we have made a query parser in which user can give select attributes, group by attributes, where clause, order by attributes... so we are forming a HQL query which is converted to the underlying database, right now we are using MSSQL but it can mysql also, it can be lotus also... we do not know what the query will be.. so no question arises of making a sql query.....
U plz assist me that how can we stop hibernate from replacing our aliases... we want hibernate to use our alias and not to reproduce it's own
second even if hibernate is replacing our alias then it must replace all the occurences of our alias , not just at one place
third there is an operator "TOP" in MS sql, which is used when we apply ORDER BY in a sub query, without this, order by cannot be applied in a sub query. This operator gives the n top values of the sub query. is there any such operator in HQL also... plz remember i m making queries at run time