Permalink
Browse files

fix for GRAILS-4561

  • Loading branch information...
1 parent 9f0cc73 commit de06cbc5878a51c58637b1851c47c5e838ea77aa @graemerocher graemerocher committed Jul 21, 2009
@@ -217,8 +217,10 @@ Try using Grails' default cache provider: 'org.hibernate.cache.OSCacheProvider'"
static final doWithDynamicMethods = {ApplicationContext ctx ->
- SessionFactory sessionFactory = ctx.getBean("sessionFactory")
- enhanceSessionFactory(sessionFactory, application, ctx)
+ for(entry in ctx.getBeansOfType(SessionFactory)) {
+ SessionFactory sessionFactory = entry.value
+ enhanceSessionFactory(sessionFactory, application, ctx)
+ }
}
public static void enhanceProxy ( HibernateProxy proxy ) {

0 comments on commit de06cbc

Please sign in to comment.