How can I change column name convention in Grails?

yura picture yura · Sep 14, 2010 · Viewed 7.6k times · Source

For now I have field "String firstName" it converted to "first_name" and i want "firstname" as default in Hibernate. Is it posible?

Answer

Aaron Saunders picture Aaron Saunders · Sep 14, 2010

5.5.2.1 Table and Column Names

class Person {
  String firstName
  static mapping = {
      table 'people'
      firstName column:'firstname'
  }
}