Package org.hibernate.annotations
Annotation Interface NaturalIdCache
Specifies that mappings from the natural id values of the annotated
entity to the corresponding entity id values should be cached in the
shared second-level cache. This allows Hibernate to sometimes avoid
round trip to the database when a cached entity is retrieved by its
natural id.
This annotation is usually used in combination with Cache
,
since a round trip may only be avoided if the entity itself is
also available in the cache.
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details
-
region
String regionSpecifies an explicit cache region name.By default, the region name is
EntityName##NaturalId
.- Default:
""
-