mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1215 - ENH: Add Query setBeanCacheMode(CacheMode) ... with a view to it replacing the existing setUseCache(boolean) and setLoadBeanCache(boolean)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user