我正在尝试实现分页,下面是代码
EntityManager entityManager = entityManagerFactory.createEntityManager();
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Employee> criteriaQuery = criteriaBuilder.createQuery(Employee.class);
Root<Employee> from= criteriaQuery.from(Employee.class);
criteriaQuery.where(criteriaBuilder.notEqual(from.get("STATUS"), "Fair"));
CriteriaQuery<Employee> select = criteriaQuery.select(from);
TypedQuery<Employee> typedQuery = entityManager.createQuery(select)
.setFirstResult(0)
.setMaxResults(5);
我在尝试执行时遇到以下错误: - SQL错误:923,SQLState:42000 ORA-00923:未找到FROM关键字