HHH-14133 fix obvious example code error for 'second level cache' in user guide
This commit is contained in:
parent
1f09db3c1c
commit
da77ef948c
|
@ -206,7 +206,7 @@ public class SecondLevelCacheTest extends BaseEntityManagerFunctionalTestCase {
|
|||
doInJPA( this::entityManagerFactory, entityManager -> {
|
||||
//tag::caching-management-cache-mode-entity-jpa-example[]
|
||||
Map<String, Object> hints = new HashMap<>( );
|
||||
hints.put( "javax.persistence.cache.retrieveMode " , CacheRetrieveMode.USE );
|
||||
hints.put( "javax.persistence.cache.retrieveMode" , CacheRetrieveMode.USE );
|
||||
hints.put( "javax.persistence.cache.storeMode" , CacheStoreMode.REFRESH );
|
||||
Person person = entityManager.find( Person.class, 1L , hints);
|
||||
//end::caching-management-cache-mode-entity-jpa-example[]
|
||||
|
@ -225,7 +225,7 @@ public class SecondLevelCacheTest extends BaseEntityManagerFunctionalTestCase {
|
|||
List<Person> persons = entityManager.createQuery(
|
||||
"select p from Person p", Person.class)
|
||||
.setHint( QueryHints.HINT_CACHEABLE, "true")
|
||||
.setHint( "javax.persistence.cache.retrieveMode " , CacheRetrieveMode.USE )
|
||||
.setHint( "javax.persistence.cache.retrieveMode" , CacheRetrieveMode.USE )
|
||||
.setHint( "javax.persistence.cache.storeMode" , CacheStoreMode.REFRESH )
|
||||
.getResultList();
|
||||
//end::caching-management-cache-mode-query-jpa-example[]
|
||||
|
|
Loading…
Reference in New Issue