Grails 1.3.7
plugins.db-reverse-engineer=0.3
Ex: I get
login(unique:['GROUP_ID','DEPARTMENT_ID'])
instead of
login(unique:['group','department'])
I am trying to modify the plugin to fix this, but in GrailsEntityPOJOClass:renderConstraints line 317 I cannot figure out how to get from the column name to the property name:
clazz.table.uniqueKeyIterator.each { UniqueKey key ->
if (key.columnSpan == 1 || key?.name == clazz.table.primaryKey?.name) return
if (key.columns[-1] == column) {
def otherNames = key.columns[0..-2].collect { "\"$
it.name\"" }
values.unique = '[' + otherNames.reverse().join(', ') + ']'
}
}
Any thoughts on how to get the property of the unique constraint participants instead of the column name?
Thanks,
-- david