-
Notifications
You must be signed in to change notification settings - Fork 199
Closed
Description
Task List
- Steps to reproduce provided
- Stacktrace (if present) provided
- Example that reproduces the problem uploaded to Github
- Full description of the issue provided (see below)
Steps to Reproduce
Using:
static mapping {
tablePerHierarchy false
}With schema-export should generate FK Constraints between parent and child entities, but this is not the case with Grails 3.3.x anymore. See https://github.com/aadrian/fieldbugs1/blob/master/h2_ddl.sql : there's no FK constraint between table_child, table_child_two and the table_parent like it was with Grails 2.2.x :(
(The corresponding entities: TableParent.groovy, TableChild, TableChildTwo.groovy )
Expected Behaviour
Same behavior as in Grails 2.x:
schema-exportshould generate FK constraints between child and parent entities.- when using
dbCreate=validatean error/warning message should be displayed if the DB is not in sync with the model.
Actual Behaviour
- FK constraints are not generated with
schema-export - validation error/warning for the missing FK is not displayed when mode is
dbCreate=validate
Environment Information
- Operating System: OSX, Linux, Win 7,8,10
- GORM Version: 6.1.9
- Grails Version (if using Grails): 3.3.3
- JDK Version: 1.8.0_162
Example Application
https://github.com/aadrian/fieldbugs1
Thank you.
zexxar, ogast2, eprozium, hornmo, bkoehm and 2 more