I have the following domains:
class Cliente {
static belongsTo = [empresa: Empresa]
static constraints = {
}
}
class Empresa {
/* aqui temos alguns atributos*/
}
When creating a new business class record I can do good:
Empresa empresa = new Empresa(params)
empresa.save(flush:true)
but attempting to update this registry:
Empresa empresa = Empresa.get(params.id)
/* ja tentei de todas essas maneiras */
empresa.properties = params
empresa = params
bindData(empresa,params)
bindData(empresa,params, exclude:[empresa.id]) // ja tentei com include em td tbm
bindData(empresa.properties, params)
I've also tried to put the property bindable: true
into constraints
more than nothing solved, sometimes the error and sometimes it just does not update the data, version of grails: 2.4.2