[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[eclipselink-users] cache report queries
|
- From: Jan Kriesten <kriesten@xxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Jul 2009 16:00:53 +0200
- Delivered-to: eclipselink-users@eclipse.org
- Organization: footprint e.K.
- User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)
Hi,
is there a way to also cache report queries? E.g. I have something like this:
Query q = entityManager.createQuery( "select count(e) from User e" )
Long result = (Long) q.getSingleResult()
If I add a cache hint to the query
q.setHint( "eclipselink.cache-usage", "CheckCacheThenDatabase" )
I get a class cast exception (User -> Long), which is a bit puzzling.
Best regards, --- Jan.