Problem Generate DDL for grails

If you need to generate a DDL for your domain classes or you face a problem grails provide a tool to handle such situations. Several problems related to DB and GORM can be easily identified by using reverse engineering. Many problems like:

  • grails Unknown column in 'field list'
  • grails domain class is not creating a table in the database
  • grails null id in table entry (don't flush the Session after an exception occurs
  • Unknown name value [] for enum class [BookList]

can be easily identified by using:

Solution grails schema-export

grails schema-export

grails schema-export --datasource=lookup

grails prod schema-export

grails dev schema-export

grails prod schema-export export

More info

For more info you can check the source:

grails schema-export