[Solution found!] 类型查询MyEntity将返回MyEntity。您想要查询Long。 CriteriaBuilder qb = entityManager.getCriteriaBuilder(); CriteriaQuery<Long> cq = qb.
確定! 回上一頁