Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default values not present in the DB. #1074

Open
3 of 4 tasks
aadrian opened this issue Mar 19, 2018 · 1 comment
Open
3 of 4 tasks

Default values not present in the DB. #1074

aadrian opened this issue Mar 19, 2018 · 1 comment

Comments

@aadrian
Copy link

aadrian commented Mar 19, 2018

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

Default values used by the UI should be propagated to the DB too (for schema-export or direct use):

https://github.com/aadrian/fieldbugs1/blob/master/grails-app/domain/com/mycorp/fieldbugs1/TableOne.groovy#L9
and
https://github.com/aadrian/fieldbugs1/blob/master/grails-app/domain/com/mycorp/fieldbugs1/TableOne.groovy#L10
are not present in the generated DDL https://github.com/aadrian/fieldbugs1/blob/master/ddl.sql

Expected Behaviour

DDL should contain the default values the UI is using, and if the DB does not, and dbCreate=validate than a warning/error should be displayed (like for other mapping differences).

Actual Behaviour

UI Default values are being ignored.

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
Copy link

zexxar commented Mar 21, 2018

I also experienced this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants