openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: JPA2.0 Criteria API question select()
Date Tue, 25 May 2010 13:26:48 GMT

> 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.

Mime
View raw message