I have this method:
public List<Object[]> allIncomeChannels(final List<String> list) {
return entityManager.createQuery(
"select string_agg(a.logicalUnitIdent,',') idents, a.incomeChannel.code, a.logicalUnitIdent, a.keyword from IncomeChannelMapEntity a GROUP BY a.incomeChannel.code, a.logicalUnitCode,a.keyword",
Object[].class).getResultList();
}
But im getting error :
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: idents near line 1, column 44
Any suggestion how can i fix this? Im using postgres