I make this request with no problem:
select ac.reg, param.alias, array_agg(numValue)
from Sample
group by ac.reg, param.alias
order by ac.reg ASC
now, I want more than the mean value. how can I get all the values as an array? I use postgresql as DB, an I know there is a array_agg method that returns exaclty what I want. but such aggregation seems not to be implemented in hibernate.
select ac.reg, param.alias, array_agg(numValue)
from Sample
group by ac.reg, param.alias
order by ac.reg ASC
raises the exception:
A java.lang.IllegalStateException has been caught, No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'array_agg' {originalText=array_agg} \-[EXPR_LIST] SqlNode: 'exprList' \-[DOT] DotNode: 'sample0_.num_value'
{propertyName=numValue,dereferenceType=ALL,propertyPath=numValue,path={synthetic-alias}.numValue,tableAlias=sample0_,className=models.Sample,classAlias=null} +-[IDENT] IdentNode: '{synthetic-alias}' {originalText={synthetic-alias}} \-[IDENT] IdentNode: 'numValue' {originalText=numValue}