#1215 - ENH: Add Query setBeanCacheMode(CacheMode) ... with a view to it replacing the existing setUseCache(boolean) and setLoadBeanCache(boolean)

This commit is contained in:
Rob Bygrave
2017-11-19 20:16:40 +13:00
parent ef91c643ed
commit 7ff3d703f7
15 changed files with 124 additions and 43 deletions
@@ -2,11 +2,12 @@ package org.tests.basic;
import io.ebean.BaseTestCase;
import io.ebean.BeanState;
import io.ebean.CacheMode;
import io.ebean.Ebean;
import org.junit.Test;
import org.tests.model.basic.Address;
import org.tests.model.basic.Customer;
import org.tests.model.basic.ResetBasicData;
import org.junit.Test;
import java.util.Map;
import java.util.Set;
@@ -23,7 +24,7 @@ public class TestLazyLoadInCache extends BaseTestCase {
Map<Integer, Customer> map = Ebean.find(Customer.class)
.select("id, name")
.setLoadBeanCache(true)
.setBeanCacheMode(CacheMode.RECACHE)
.setReadOnly(true)
.orderBy().asc("id")
.findMap();