> It should be CriteriaQuery<Corporation> q = cb.createQuery(String.class); 

Compiler will not let you do that either. The API signature of
CriteriaBuilder is

    CriteriaQuery<T> createQuery(Class<T> resultClass);

So the correct code is
    CriteriaQuery<String> q = cb.createQuery(String.class);     


-----
Pinaki 
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/JPA2-0-Criteria-API-question-select-tp5094119p5098447.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to