Following the example on page https://openjpa.apache.org/builds/2.4.2/apache-openjpa/docs/jpa_overview_criteria.html

CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();
CriteriaQuery<EntityZ> criteriaQuery = criteriaBuilder.createQuery(EntityZ.class);
Root<EntityZ> entity = criteriaQuery.from(EntityZ.class);
Root<Detail> detail = entity.join(entity.get(EntityZ_.details));

results in

Type mismatch: cannot convert from Expression<List<Detail>> to SingularAttribute<? super EntityZ,Y>

also is there a typo?

qdef.where(customer.get(Customer_.name).equal("John Doe").and(order.get(Order_.status).equal(OrderStatus.DELIVERED).not()));

there is no such function as equal?  should it be equals?  also in my case:

criteriaQuery.where(entity.get(EntityZ_.id).equals(entityId));

results in:

The method where(Expression<Boolean>) in the type CriteriaQuery<EntityZ> is not applicable for the arguments (boolean)

Reply via email to