I want to write a sql-query in the hbm file,
and wanted to query with a result of two columns of integer.
i.e. SELECT group_id as {i}, sum(....) as {j} from table inner join.....
And I cannot use HQL because of the formula.
I have tried to use Object[], int , java.lang.Integer in class of <return> tag, but failed. It seem only a hibernate mapping class is allowed.
Can native sql query in hibernate can do query like HQL? multiple objects and/or properties as an array of type Object[]
I read the document many times and search about it, but not found any information about this.
I am using Hibernate 2.1.7c.
|