I want to create a query that will select all positions by the id of the smartphone with the CriteriaBuilder
in the abstract facade
public List<T> findAllById(int id) {
javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();
cq.select(cq.from(entityClass));
return getEntityManager().createQuery(cq).getResultList();
}