The JPQL (Java Persistence Query Language) supports defining subqueries, which are nested queries that are embedded in other queries.

Subqueries are currently not supported by ObjectDB, and as a workaround, you can use a sequence of two or more queries, where the results of one query serves as a parameter in the next queries.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)