Hello,

I would to know if it's possible to fetch newObject directely from cache with 
ObjectSelect.

For now i don't manage to do this, for example when I make something like that :


List<MyTable> list1 = ObjectSelect.query(MyTable.class)

    .cacheStrategy(QueryCacheStrategy.LOCAL_CACHE,"MyGroup")

    .select(getObjectContext());


MyTable o1 = getObjectContext().newObject(MyTable.class);

o1.setName("nouveau");

getObjectContext().commitChanges();



List<MyTable> list2 = ObjectSelect.query(MyTable.class)

    .cacheStrategy(QueryCacheStrategy.LOCAL_CACHE,"MyGroup")

    .select(getObjectContext());


For result list1 and list2 have same size, i have to switch QueryCacheStrategy 
to LOCAL_CACHE_REFRESH to get new row, but there is a database transaction.


Thanks


Reply via email to