//主键变量及生成方式
String id = UUID.randomUUID().toString()
//映射到数据库特定字段
static mapping = {
id column: "objectId", generator: "assigned"
}
//主键变量及生成方式
String id = UUID.randomUUID().toString()
//映射到数据库特定字段
static mapping = {
id column: "objectId", generator: "assigned"
}
转载于:https://my.oschina.net/rex2012/blog/759865