Grails - Initiating domain class using JSON

后端 未结 3 955
情歌与酒
情歌与酒 2020-12-21 06:18

I have this simple domain class:

class Settings {
static constraints = {
    uid(nullable: false, unique: true)
    person()
}

String uid
Map person
}
         


        
3条回答
  •  感情败类
    2020-12-21 06:43

    If you add this line before instantiating Settings, it will bind recursively.

    JSON.use('deep')
    

提交回复
热议问题