Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Mac OS X 10.5.2, java 1.5.0_13, MySQL 5.0.45, mysql-connector-java-5.0.7-bin.jar
Description
The actual value of dbCreate passed to Hibernate should always be the most-specific one from DataSource.groovy (if I understood the purpose of environments correctly).
Sometimes the generic value (from the top-level dataSource block) takes precedence.
Here is a summary of my tests, DataSource.groovy files and debug output to be attached to issue later (I manually drop the tables between each run):
| VALUE IN TOP-LEVEL BLOCK | VALUE IN development ENVIRONMENT BLOCK | OUTCOME |
|---|---|---|
| create-drop | undef | tables are dropped and re-created |
| create-drop | update | tables are updated, created when non-existent |
| undef | create-drop | tables are dropped and re-created |
| update | create-drop | tables are dropped and re-created |
| create | undef | tables are dropped and re-created |
| create | update | tables are dropped and re-created |
| undef | create | tables are dropped and re-created |
| update | create | tables are dropped and re-created |
| undef | update | hbm2ddl not run |
| update | undef | tables are updated, created when non-existent |
Zip Archive.zip contains 20 files : 10 versions of DataSource.groovy and 10 log files of grails startup using the corresponding DataSource.groovy config.