Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] cache report queries

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.




Back to the top