JPA Query language support in OBjectDB / Sub query or nested Query

#1

Hi

Wanted to check with you on the exact level of support of JPA QL within the ObjectDB world.

I have given a sample typed query below which fails to work with ObjectDB and it runs very well with the Hibernate/MySQL JPA. We are using Spring Data here.

It looks like a problem with Sub query or nested queries where I am using IN clause like below.

@Query("SELECT product FROM Product product WHERE product.id in (SELECT msg.objectId FROM Message msg WHERE msg.contextId = :contextIdParam)")
List<Product> findByContextID(@Param("contextIdParam") String contextId);

 

org.springframework.orm.jpa.JpaSystemException: Unexpected query token 'SELECT'; nested exception is com.objectdb.o._PersistenceException: Unexpected query token 'SELECT'
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:321)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:404)
at

|

|

|

Caused by: com.objectdb.o.UserException: Unexpected query token 'SELECT'
at com.objectdb.o.MSG.d(MSG.java:61)

at com.objectdb.o.TKN.J(TKN.java:765)

 

 

Thank you

- Sandeep

#2

Inner queries are not supported yet.

The issue tracking system contains an up to date list of unsupported JPA features.

ObjectDB Support

Reply