Skip to content

Commit

Permalink
fix: Change dataSource/hibernate config (#266)
Browse files Browse the repository at this point in the history
The dataSource config in the documentation uses dataSource.dbCreate.
Grails Forge creates an application.yml with hibernate.hbm2ddl.auto.
These two config settings do the same thing under the hood, which is set hibernate.hbm2ddl.auto. I suggest the application forge uses the documented config setting dataSource.dbCreate.
  • Loading branch information
matrei authored Jan 15, 2024
1 parent 2eb6bf6 commit b025f0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void apply(GeneratorContext generatorContext) {
applyDefaultGormConfig(config);
config.put("dataSource.pooled", true);
config.put("dataSource.jmxExport", true);
config.put("hibernate.hbm2ddl.auto", "update");
config.put("dataSource.dbCreate", "update");
config.put("hibernate.cache.queries", false);
config.put("hibernate.cache.use_second_level_cache", false);
config.put("hibernate.cache.use_query_cache", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class HibernateGormSpec extends ApplicationContextSpec implements CommandOutputF
ctx.configuration.containsKey("dataSource.url")
ctx.configuration.containsKey("dataSource.pooled")
ctx.configuration.containsKey("dataSource.jmxExport")
ctx.configuration.containsKey("hibernate.hbm2ddl.auto")
ctx.configuration.containsKey("dataSource.dbCreate")
ctx.configuration.containsKey("hibernate.cache.queries")
ctx.configuration.containsKey("hibernate.cache.use_second_level_cache")
ctx.configuration.containsKey("hibernate.cache.use_query_cache")
Expand Down

0 comments on commit b025f0e

Please sign in to comment.