例如我有这样的域类:
class PaymentSystems {
String paymentSystemName
long bill
boolean enabled = true
static belongsTo = [cafee: Cafee]
static constraints = {
bill nullable: true
cafee nullable: true
}
}
此字符串可以返回唯一的项目列表:
def paymentSystems = PaymentSystems.list().unique()
但是我想在例如paymentSystemName - property上创建唯一的列表中继,即我想获得具有唯一的paymentSystemName-property的列表。怎么做?