I modified the example code to include an index on the Point class like so:
@Index(members={"x","y"})
Then when I run the following query:
TypedQuery<Point> query = em.createQuery("SELECT p FROM Point p where p.x <= :x and p.y >= :y",
Point.class);
I get the exception at the end. I do not get an exception if I:
- Use no index
- Index only on "x"
- Use an OR in the query instead of AND
[ObjectDB 2.3.0_04] Unexpected exception (Error 990) Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_22 (on Windows 7 6.1). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.ClassCastException: com.objectdb.o.NLV cannot be cast to com.objectdb.o.CMV java.lang.ClassCastException: com.objectdb.o.NLV cannot be cast to com.objectdb.o.CMV at com.objectdb.o.VOB.l(VOB.java:218) at com.objectdb.o.NFL.Uu(NFL.java:89) at com.objectdb.o.SBI.u(SBI.java:109) at com.objectdb.o.OBI.w(OBI.java:466) at com.objectdb.o.OBI.<init>(OBI.java:188) at com.objectdb.o.SBI.<init>(SBI.java:50) at com.objectdb.o.MST.aU(MST.java:737) at com.objectdb.o.BQI.Ut(BQI.java:123) at com.objectdb.o.FQI.Ut(FQI.java:68) at com.objectdb.o.PRG.ab(PRG.java:603) at com.objectdb.o.QRM.US(QRM.java:259) at com.objectdb.o.MST.US(MST.java:892) at com.objectdb.o.WRA.US(WRA.java:290) at com.objectdb.o.WSM.US(WSM.java:113) at com.objectdb.o.QRR.g(QRR.java:232) at com.objectdb.o.QRR.b(QRR.java:151) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:665) at point.Main.main(Main.java:52)