We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a01a4fa commit 6f4936cCopy full SHA for 6f4936c
src/groovy/org/codehaus/groovy/grails/plugins/orm/hibernate/HibernatePluginSupport.groovy
@@ -218,8 +218,10 @@ Try using Grails' default cache provider: 'org.hibernate.cache.OSCacheProvider'"
218
219
static final doWithDynamicMethods = {ApplicationContext ctx ->
220
221
- SessionFactory sessionFactory = ctx.getBean("sessionFactory")
222
- enhanceSessionFactory(sessionFactory, application, ctx)
+ if(ctx.containsBean("sessionFactory")) {
+ SessionFactory sessionFactory = ctx.getBean("sessionFactory")
223
+ enhanceSessionFactory(sessionFactory, application, ctx)
224
+ }
225
}
226
227
public static void enhanceProxy ( HibernateProxy proxy ) {
0 commit comments