Hi,
I have a problem with constructing query, that gets only embedded list of integers from Entity. Here's the example :
Query query = em.createQuery("SELECT i.filterDescription FROM Inspiration i"); List<List<Integer>> result = query.getResultList();
where Inspiration is like this :
@Entity(name = "Inspiration") public class Inspiration implements Serializable { (...) @ElementCollection(fetch = FetchType.EAGER) protected List<Integer> filterDescription; (...) }
Whene i try to run this code I get error :
Caused by: com.objectdb.o.UserException: Invalid result expression 'java.util.List' for an aggregate query at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.QRC.G(QRC.java:609) at com.objectdb.o.QRC.F(QRC.java:565) at com.objectdb.o.QRC.E(QRC.java:514) at com.objectdb.o.QRC.v(QRC.java:211) at com.objectdb.o.QRC.u(QRC.java:166) at com.objectdb.o.QRM.U4(QRM.java:245) at com.objectdb.o.MST.U4(MST.java:947) at com.objectdb.o.WRA.U4(WRA.java:290) at com.objectdb.o.WSM.U4(WSM.java:113) at com.objectdb.o.STC.r(STC.java:447) at com.objectdb.o.SHN.aj(SHN.java:489) at com.objectdb.o.SHN.K(SHN.java:156) at com.objectdb.o.HND.run(HND.java:133) at java.lang.Thread.run(Thread.java:662)
Is it a bug or am I doing something wrong?