瀏覽代碼

use SQL delete for removing AppData associated with device. it could be huge, skip hibernate layer

tags/v0.3.0
Jonathan Cobb 4 年之前
父節點
當前提交
3262393808
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      bubble-server/src/main/java/bubble/dao/app/AppDataDAO.java

+ 3
- 3
bubble-server/src/main/java/bubble/dao/app/AppDataDAO.java 查看文件

@@ -86,8 +86,8 @@ public class AppDataDAO extends AppTemplateEntityDAO<AppData> {
return list(criteria().add(and(crits.toArray(new Criterion[0]))));
}

protected List<AppData> findByDevice(String uuid) { return findByField("device", uuid); }
public void deleteDevice(String uuid) { delete(findByDevice(uuid)); }
public void deleteDevice(String uuid) {
getConfiguration().execSql("DELETE FROM app_data WHERE device = ?", new Object[] {uuid});
}

}

Loading…
取消
儲存