Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCache hits for non object queries
https://www.eclipse.org/forums/index.php/mv/msg/162824/515089/#msg_515089
For example a query like this that retrieves the lastnames from all Employees:
SELECT e.lastname FROM Employee e
Assume the table is cached with a full cache and a query was executed before so the cache should be fully populated. When using a ReportQuery i get an exception that report queries can not be used with CheckCacheOnly, when i use a ReadAllQuery the query returns objects instead of only the lastname values.]]>No real name2010-02-17T16:54:59-00:00Re: Cache hits for non object queries
https://www.eclipse.org/forums/index.php/mv/msg/162824/515440/#msg_515440
No, ReportQuery (which is used for queries returning non-entities) will only hit the database. The reason is likely because the cache is an object cache, and report queries just were over looked as in-memory querying was implemented - it might have just been assumed the entire object would be wanted since it is available. A feature could be filed to get EclipseLink to extract the fields from objects after running the query in-memory, but It might be more efficient to have the application run a query for the entities and then just pull the data from the returned entities directly.
Best Regards,
Chris]]>Chris Delahunt2010-02-18T18:57:25-00:00