schema-export does not work in plugins
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
**Problem**
If you create a plugin that defines domain objects using gorm hibernate5:6.1.12 calling `grails run-command schema-export` fails with `Command execution error: org.hibernate.tool.hbm2ddl.SchemaExport: method ()V not found`
If you create an app and try `grails schema-export`, it works as expected.
If you use the plugin in an application, `grails schema-export` also works as expected.
**Test project with readme:** https://github.com/pmcneil/testg3plugin
**Use case for schema-export in a plugin:** existing grails 2 plugin https://github.com/bio-org-au/nsl-domain-plugin uses schema-export to build an executable schema to set up new shard databases and create upgrade scripts.
Contributor guide
Research direction
Start with the linked test project and its README, then reproduce the failure with `grails run-command schema-export` in a plugin defining domain objects with gorm hibernate5:6.1.12. Compare this with schema export in an application and in an application using the plugin; done means plugin-defined domain objects can be exported without the SchemaExport constructor error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100