class Book {
String title
Date releaseDate
Author author
}
hibernate
Purpose
The hibernate
plugin configures the Hibernate implementation of GORM.
Examples
An example domain class:
Description
Refer to the section on GORM in the Grails user guide which details how to create Grails domain classes.
Configured Spring Beans:
-
dialectDetector
- An instance of {apiDocs}org/grails/orm/hibernate/support/HibernateDialectDetectorFactoryBean.html[HibernateDialectDetectorFactoryBean] that attempts to automatically detect the Hibernate Dialect which is used to communicate with the database. -
hibernateProperties
- AMap
of Hibernate properties passed to theSessionFactory
-
lobHandlerDetector
- An instance of {apiDocs}org/grails/orm/hibernate/support/SpringLobHandlerDetectorFactoryBean.html[SpringLobHandlerDetectorFactoryBean] that attempts to automatically detect the Spring LobHandler to use based on the database. -
sessionFactory
- An instance of the Hibernate SessionFactory class -
transactionManager
- An instance of Spring’s {springapi}org/springframework/orm/hibernate3/HibernateTransactionManager.html[HibernateTransactionManager] class -
persistenceInterceptor
- An instance of {apiDocs}org/grails/orm/hibernate/support/HibernatePersistenceContextInterceptor.html[HibernatePersistenceContextInterceptor] that abstracts away how persistence is used from the controller/view layer so that Grails can be used without GORM. -
openSessionInViewInterceptor
- An instance of {apiDocs}org/grails/orm/hibernate/support/GrailsOpenSessionInViewFilter.html[GrailsOpenSessionInViewFilter] that deals with Grails' Session management.