It is getting more and more frustrating :( We've introduced distinct select instead of regular selection in our code (no changes else) and suddenly receive invalid identifiers in queries exceptions in various queries. Here's the stacktrace:
Caused by: com.objectdb.o.UserException: Invalid order expression '$3' for distinct results at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.QNF.l(QNF.java:333) at com.objectdb.o.QNF.n(QNF.java:389) at com.objectdb.o.QNF.k(QNF.java:169) at com.objectdb.o.QNF.z(QNF.java:774) at com.objectdb.o.QNF.k(QNF.java:257) at com.objectdb.o.QNF.B(QNF.java:878) at com.objectdb.o.QNF.k(QNF.java:277) at com.objectdb.o.QNF.j(QNF.java:134) at com.objectdb.o.QRC.E(QRC.java:540) at com.objectdb.o.QRC.v(QRC.java:211) at com.objectdb.o.QRC.u(QRC.java:166) at com.objectdb.o.QRM.U5(QRM.java:245) at com.objectdb.o.MST.U5(MST.java:947) at com.objectdb.o.WRA.U5(WRA.java:290) at com.objectdb.o.WSM.U5(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:680)
Sorry but I've tried one hour to replicate it in a simple demo without success. Furthermore, doing a simple .toString() of the CriteriaQuery doesn't contain any variable named $3!!! And even worse.. when debugging in eclipse which calls the .toString() of the CriteriaQuery at different points in time, it happens that we get the same identifier (namely, $1) multiple times for different selections in the same query!! so after debugging the query returns useless.. but anyway, I can ignore this however the issue mentioned before is again a full show stopper for us we cannot work around :((
thanks for fast help!!