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 HibernateDialectDetectorFactoryBean that attempts to automatically detect the Hibernate Dialect which is used to communicate with the database. -
hibernateProperties- AMapof Hibernate properties passed to theSessionFactory -
sessionFactory- An instance of the Hibernate SessionFactory class (Hibernate 7 users: SessionFactory) -
transactionManager- An instance of HibernateTransactionManager fromgrails-data-hibernate5-spring-orm(Hibernate 7 users: HibernateTransactionManager fromgrails-data-hibernate7-spring-orm). Spring Framework 7 removed the originalorg.springframework.orm.hibernate5.HibernateTransactionManager; Grails vendors the equivalent class for each supported Hibernate version. -
persistenceInterceptor- An instance of 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 GrailsOpenSessionInViewFilter that deals with Grails' Session management (Hibernate 7 users: Session).