For last few hours I was playing with above query and got another exception after modification to this form:
TypedQuery<ResultData> q = em.createQuery(
"select new pl.hplxtool.model.ResultData(p.type.name, p.done, count(p.id)) from Product as p group by p.type.name,p.done",
ResultData.class);
List<ResultData> res = q.getResultList();
p.done is boolean type. ResultData was modified like this:
public class ResultData {
public String name;
public long all;
public boolean done;
public ResultData(String prodType, boolean done, long all) {
this.name = prodType;
this.all = all;
this.done = done;
}
}
Exception that is thrown:
com.objectdb.o.InternalException: null
at com.objectdb.o.InternalException.f(InternalException.java:236) ~[objectdb.jar:na]
at com.objectdb.o.REG.M(REG.java:669) ~[objectdb.jar:na]
at com.objectdb.o.REG.J(REG.java:549) ~[objectdb.jar:na]
at com.objectdb.o.REG.K(REG.java:570) ~[objectdb.jar:na]
at com.objectdb.o.REG.f(REG.java:503) ~[objectdb.jar:na]
at com.objectdb.o.VOB.j(VOB.java:188) ~[objectdb.jar:na]
at com.objectdb.o.GQI.Us(GQI.java:152) ~[objectdb.jar:na]
at com.objectdb.o.PRG.aa(PRG.java:584) ~[objectdb.jar:na]
at com.objectdb.o.QRM.UR(QRM.java:256) ~[objectdb.jar:na]
at com.objectdb.o.MST.UR(MST.java:866) ~[objectdb.jar:na]
at com.objectdb.o.WRA.UR(WRA.java:286) ~[objectdb.jar:na]
at com.objectdb.o.WSM.UR(WSM.java:113) ~[objectdb.jar:na]
at com.objectdb.o.WRA.UR(WRA.java:286) ~[objectdb.jar:na]
at com.objectdb.o.WSN.UR(WSN.java:417) ~[objectdb.jar:na]
at com.objectdb.o.STC.r(STC.java:418) ~[objectdb.jar:na]
at com.objectdb.o.SHN.ah(SHN.java:468) ~[objectdb.jar:na]
at com.objectdb.o.SHN.J(SHN.java:146) ~[objectdb.jar:na]
at com.objectdb.o.HND.run(HND.java:133) ~[objectdb.jar:na]
at java.lang.Thread.run(Thread.java:619) ~[na:1.6.0_23]
And btw - sorry for doulbe posts - the proxy that I'm using here is just broken...