Skip to main content

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


Thanks for the help James,
I filed a bug for this issue, https://bugs.eclipse.org/bugs/show_bug.cgi?id=240711

James Sutherland skrev:
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
https://dev.eclipse.org/mailman/listinfo/eclipselink-users




-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink , http://wiki.oracle.com/page/TopLink TopLink Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , http://www.nabble.com/EclipseLink-f26430.html EclipseLink Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence



Back to the top