数据库中对象的字段未更新且没有错误。
class Transaction {
static mapWith = "mongo"
ObjectId id
String name
Address address
static embedded = ['address']
}
class Address {
String country
}
def tempMethod() {
def transaction = Transaction.first()
transaction.address = new Address(country: "Canada")
transaction.save(flush: true, failOnError: true)
}