mirror of
https://github.com/apache/openjpa.git
synced 2025-03-06 08:29:08 +00:00
Fix sample code typo; em -> emf.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1146252 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dae5ba7def
commit
391c4c2117
@ -435,9 +435,9 @@ import javax.persistence.Cache;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.Persistence;
|
||||
. . .
|
||||
EntityManagerFactory em =
|
||||
EntityManagerFactory emf =
|
||||
Persistence.createEntityManagerFactory("myPersistenceUnit");
|
||||
Cache cache = em.getCache();
|
||||
Cache cache = emf.getCache();
|
||||
. . .
|
||||
</programlisting>
|
||||
</example>
|
||||
@ -446,7 +446,7 @@ Cache cache = em.getCache();
|
||||
<title>Using the javax.persistence.Cache interface</title>
|
||||
<programlisting>
|
||||
// Check whether the cache contains an entity with a provided ID
|
||||
Cache cache = em.getCache();
|
||||
Cache cache = emf.getCache();
|
||||
boolean contains = cache.contains(MyEntity.class, entityID);
|
||||
|
||||
// evict a specific entity from the cache
|
||||
|
Loading…
x
Reference in New Issue
Block a user