Search code examples
grailsgrails-ormgrails-3.1

Grails3 + mysql not creating table name and column name with camel notation


Actually i migrated grails2 to grails3. but domain names are not properly binding with mysql db table. For eg:

domainName is: EmployeeCompany
expected table name in mysql: employee_company
but its creating as with the name: EmployeeCompany

Solution

  • Try setting this property on application.yml (DataSource.groovy in grails 2):

    hibernate { 
        naming_strategy = org.hibernate.cfg.ImprovedNamingStrategy
    }