Skip to content

Instantly share code, notes, and snippets.

View alex-shamshurin's full-sized avatar

Alexander Shamshurin alex-shamshurin

  • SIT Development
  • Moscow
View GitHub Profile
@mrapczynski
mrapczynski / BannerHibernateConfiguration.groovy
Last active December 17, 2018 17:40
Example of creating a Hibernate configuration class for the Grails platform to allow developer control which tables (via domain objects) are given the GORM treatment during startup of a Grails application. I created it to be simple object-oriented method where I can mix domain objects that were either (a) custom to the application and needed sch…
package edu.fhda.grails.hibernate
import groovy.util.logging.Log4j
import org.codehaus.groovy.grails.commons.GrailsApplication
import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration
import org.hibernate.HibernateException
import org.hibernate.dialect.Dialect
import org.hibernate.tool.hbm2ddl.DatabaseMetadata
/**