diff --git a/src/main/groovy/org/grails/plugins/databasemigration/command/ApplicationContextDatabaseMigrationCommand.groovy b/src/main/groovy/org/grails/plugins/databasemigration/command/ApplicationContextDatabaseMigrationCommand.groovy index 86a8a5a7..258b9b39 100644 --- a/src/main/groovy/org/grails/plugins/databasemigration/command/ApplicationContextDatabaseMigrationCommand.groovy +++ b/src/main/groovy/org/grails/plugins/databasemigration/command/ApplicationContextDatabaseMigrationCommand.groovy @@ -82,7 +82,7 @@ trait ApplicationContextDatabaseMigrationCommand implements DatabaseMigrationCom String dataSourceName = getDataSourceName(dataSource) String sessionFactoryName = "sessionFactory" if (!isDefaultDataSource(dataSource)) { - sessionFactoryName = sessionFactoryName + '_' + dataSourceName + sessionFactoryName = sessionFactoryName + '_' + dataSource } def serviceRegistry = applicationContext.getBean(sessionFactoryName, SessionFactoryImplementor).serviceRegistry.parentServiceRegistry