如何检索Grails复合ID属性列表?
我尝试了以下内容,但id属性返回Long:
域
class Domain implements Serializable {
String field1
String field2
static mapping = {
id composite: ['field1', 'field2']
}
}
测试
def d = DefaultGrailsDomainClass(Domain.class)
assert(d.identifier.type == java.lang.Long)