diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/From/Client4.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/From/Client4.java index f8cb9e5c03..316edf121a 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/From/Client4.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/core/criteriaapi/From/Client4.java @@ -301,7 +301,7 @@ public void fromGetMapAttributeTest() throws Exception { getEntityTransaction().begin(); - CriteriaQuery cquery = cbuilder.createQuery(Expression.class); + CriteriaQuery cquery = cbuilder.createQuery(Employee.class); From department = cquery.from(Department.class); cquery.where(cbuilder.equal(department.get("id"), 1)); cquery.select(department.get(Department_.lastNameEmployees)); @@ -361,7 +361,7 @@ public void pathGetMapAttributeTest() throws Exception { getEntityTransaction().begin(); - CriteriaQuery cquery = cbuilder.createQuery(Expression.class); + CriteriaQuery cquery = cbuilder.createQuery(Employee.class); Path department = cquery.from(Department.class); cquery.where(cbuilder.equal(department.get("id"), 1)); cquery.select(department.get(Department_.lastNameEmployees));