Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] cacheQueryResults in JPA ?

There is not currently a JPA query hint to do this (feel free to log a bug to
get this added), so you need to use a SessionCustomizer to customize the JPA
query using Java code.  You should be able to get any JPA named query from
the EclipseLink Session's named queries, and call cacheQueryResults() on it.

Gustav Trede-2 wrote:
>  hello,
> Im trying to enable query result set caching, but i fail to understand 
> how to do it in JPA .
> ELUG example is:
> ReadObjectQuery query = new ReadObjectQuery(SurveillanceCompany.class);
> query.cacheQueryResults();
> SurveillanceCompany  sc = (SurveillanceCompany) 
> session.executeQuery(query);
> thanks
>   gustav
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx

--- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top