Folks,
I have this code that doesn't work correctly.
Trying to query all objects from database and receiving them always from
the broker's cache. So now I am cleaning the cache every time before query.
Can I do it in any other way so that I don't need to clear the whole cache
every time?
//-- THIS IS THE CODE
public Collection findAll(Class clazz) {
Collection retVal = null;
PersistenceBroker broker = getBroker();
/* SHOULD UNCOMMENT IN ORDER TO WORK
broker.clearCache();
*/
Criteria selectAll = null;
Query query = QueryFactory.newQuery(clazz, selectAll);
retVal = broker.getCollectionByQuery(query);
return retVal;
}
//--
Thank you,
Sergey Manukyan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]