Hi,
I'm trying to get a single string by concatenating a text field. Of course, the version of Postgres I'm using doesn't have the string_agg function, so I have to use array_agg:
Code:
String queryString = "select new PerformanceProfile(min(sp.id), sp.category, max(sp.samplecount), array_agg(sp.toptraces)) " +
"from PerformanceProfile sp where sp.operation = '" + pageName + "' and " +
"sp.keytype = 6 and sp.timewidth = 0 and sp.summarylevel = 0 and sp.category is not null group by sp.category " +
"order by sp.category desc";
list = getHibernateTemplate().find(queryString);
However, it throws an "Unable to locate appropriate constructor on class" error, presumably because I don't know the return type to use for array_agg, and I can't seem to find it in the documentation:
Code:
public PerformanceProfile(Integer id, String category, Integer samplecount, String toptraces) { ... }
Any help would be great, thanks.