Grails判别器 - ids列指向两个不同的类

时间:2016-02-05 21:03:38

标签: grails gorm

似乎无法弄清楚如何选择列指向使用鉴别器的内容

class Groups{

   String groupCode
  static mapping{
      discriminator value:"1", formula:"case   
     when group_codein ('SLT','DDG') then 0 else 1 end", type:"integer"
   }

 }

class SupportLiveTraining extends Groups{
         static mapping{
             discriminator value:"0"
        }
     StaffSupportGroup group

  }

 class PurchaseSupport extends Groups{
         static mapping{
             discriminator value:"1"
      }
  CustomerSupportGroup group

}

我收到错误“返回类型... SupportLiveTraining getGroup()与Groups.getGRoup()不兼容”

0 个答案:

没有答案