I am trying to migrate my Spring project from Hibernate to ObjectDB. On ObjectDB page, they say that ObjectDB is 100% compatible with JPA. However, I have problem with this JPQL query:
SELECT e FROM Employee e WHERE e.present = false AND NOT EXISTS
(SELECT c FROM Computer c WHERE c.employeeEntity = e)
ORDER BY e.name
with Hibernate, there was no problem with this query, but ObjectDB throws exception:
com.objectdb.o.UserException: Unexpected query token 'EXISTS'
Second problem is with Criteria Language. This code:
In<Employee> inExpression = cb.in(root.get(Computer_.employeeEntity));
for (Long id : emplIds) {
Employee e = new Employee(id);
inExpression = inExpression.value(e);
}
list.add(inExpression);
was working with Hibernate, with ObjectDB it is throwing:
com.objectdb.o.UserException: Unexpected query token ':l2'
at com.objectdb.o.MSG.d(MSG.java:61)
at com.objectdb.o.TKN.J(TKN.java:765)
at com.objectdb.o.QNF.B(QNF.java:894)
at com.objectdb.o.QNF.I(QNF.java:1294)
at com.objectdb.o.QNF.k(QNF.java:315)
at com.objectdb.o.QNF.H(QNF.java:1270)
at com.objectdb.o.QNF.k(QNF.java:210)
at com.objectdb.o.QNF.t(QNF.java:611)
at com.objectdb.o.QNF.t(QNF.java:605)
at com.objectdb.o.QNF.k(QNF.java:218)
at com.objectdb.o.QNF.j(QNF.java:135)
at com.objectdb.o.QRC.z(QRC.java:321)
at com.objectdb.o.QRC.v(QRC.java:212)
at com.objectdb.o.QRC.u(QRC.java:166)
at com.objectdb.o.QRM.U6(QRM.java:250)
at com.objectdb.o.MST.U6(MST.java:933)
at com.objectdb.o.WRA.U6(WRA.java:291)
at com.objectdb.o.WSM.U6(WSM.java:113)
at com.objectdb.o.STC.r(STC.java:449)
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:132)
at java.lang.Thread.run(Unknown Source)
Does anybody have any idea how to solve these problems?
Milan