I use grails with a legacy database, all hibernate classes and their mappings are packaged in a jar file and reside in the grails lib folder. Querying/updating/inserting with GORM works ok.
Now I would like to add some mappings, let’s say I want to add the mapping:
id column:'person_id'
Is there any way to do this ?
No, there isn’t an easy way to do this. You can either map a class using Hibernate mapping classes or use the custom mapping DSL. But you can’t use both on a single class.
In fact, to use the mapping DSL you have to create a standard GORM domain class under
grails-app/domain.