I map a bunch of legacy tables to my domain objects. Is there a way to find the column name of a property database in the Domain class (or vice versa)? For instance:
class Person { String firstName . . . }
Is there a way to use firstName to return the string "FIRST_NAME" or "first_name"? I tried to use
GrailsDomainBinder.getMapping(Person).columns
but for some reason this gives me an id column. Thanks!
user854577
source share