]
Steve Ebersole closed HHH-4660.
-------------------------------
Resolution: Fixed
Support Cache Retrieve Mode and Cache Store Mode Properties
-----------------------------------------------------------
Key: HHH-4660
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4660
Project: Hibernate Core
Issue Type: Sub-task
Components: caching (L2), entity-manager
Reporter: Emmanuel Bernard
Assignee: Steve Ebersole
Fix For: 3.5.0-Beta-4
Time Spent: 4 hours, 3 minutes
Remaining Estimate: 0 minutes
Specified by section 3.7.2
Essentially analogous to the older Hibernate notion of org.hibernate.CacheMode, except
that JPA splits the read and write phases into separate discrete values for retrieving and
storing.
In terms of specifying "retrieval behavior", users would use the
"javax.persistence.cache.retrieveMode"
(org.hibernate.ejb.AvailableSettings#SHARED_CACHE_RETRIEVE_MODE) property, with a value
corresponding to one of the javax.persistence.CacheRetrieveMode enum values.
For "storage behavior", there is the javax.persistence.cache.storeMode
(org.hibernate.ejb.AvailableSettings#SHARED_CACHE_STORE_MODE) property and the
corresponding javax.persistence.CacheStoreMode enum values.
These values cannot be specified on the EMF, so each EM starts with a fresh default set
of behaviors (javax.persistence.CacheRetrieveMode#USE and
javax.persistence.CacheStoreMode#USE). The default for a given EM can be altered using
EntityManager#setProperty
It is also valid to alter either (or both) the retrieval or storage behavior via:
* any of the EntityManager#find methods taking a Map of hints; valid for both retrieve
and store.
* any of the EntityManager#refresh methods taking a Map of hints; only valid for store,
as refresh always hits the database (retrieveMode is ignored)
* Query/TypedQuery#setHint; valid for both retrieve and store.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: