举个例子
org —— static hasMany = [staffs: Staff]
而org中又有法人(类型为Staff)这个属性
staff —— static belongsTo = [org: Org]
因为org是staff的外键,所以必须先save() org,再save() staff
Org org = new Org()
//org的各种信息
org.save()
Staff staff = new Staff()
//staff的各种信息
staff.org = org
staff.save()
之后
org.legal = staff
org.save() //此处save可有可无
完成