I'm using jpa criteria for my select clause. I'm not able to get the result set. Here is my code
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Object[]> cq = cb.createQuery(Object[].class);
Root<PKEntity> root = cq.from(PKEntity.class);
List<Object[]> resultlist = em.createQuery(cq).getResultList();
It throws the following error
No terms is selected for criteria query. Use CriteriaQuery.select or multiselect.
What I'm doing wrong here? I'm using my mobile to post.. so I'm sorry I could nt post the whole stacktrace