Grails params assignement transforms a map of objects to a map of strings


New member
According to Grails doc I can have a Map of objects in a Domain,ListsAndMaps

In Bootstrap and unit tests it works fine. I pre-fill my map in the domain constructor.

domainObject tmp = new DomainObject()
map.putAt(it.value, tmp)
Where It fails is the the PARAMS assigment in a controller or command.

def tmp = new DomainObject()
// Holds a complete map of objects with version id etc.. = params
// the map is NOW automatically transformed to a map of strings
My params have the following format in case that is the issue

comments[keya]id ""
comments[keya]comment "this is the comment"
comments[keyb]id ""
comments[keyb]comment "this is another comment"
So far The only solution I see is make everything a LIST and FIND the appropriate key when displaying and saving. I seem to missing the point on how to make a map of object work.