(快速參考)

exists

目的

檢查指定的 id 是否有實例存在

範例

def accountId = ...
if (Account.exists(accountId)) {
    // do something
}

說明

參數

  • id - 物件的 id