Browse Source

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

tags/v0.3.0
Jonathan Cobb 4 years ago
parent
commit
3262393808
1 changed files with 3 additions and 3 deletions
  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 View File

@@ -86,8 +86,8 @@ public class AppDataDAO extends AppTemplateEntityDAO<AppData> {
return list(criteria().add(and(crits.toArray(new Criterion[0])))); 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…
Cancel
Save