Skip to content

Commit

Permalink
Merge pull request #507 from PhenoApps/v5.3/hotfix/database_delete_fi…
Browse files Browse the repository at this point in the history
…eld_fix

Db bug fix
  • Loading branch information
trife authored Sep 22, 2022
2 parents da3f860 + 0b71427 commit c68add4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class StudyDao {
db.rawQuery("PRAGMA foreign_keys=OFF", null)
db.delete(ObservationUnit.tableName, "${Study.FK} = ?", arrayOf(exp_id.toString()))
db.delete(ObservationUnitValue.tableName, "${Study.FK} = ?", arrayOf(exp_id.toString()))
db.delete(ObservationUnitAttribute.tableName, "${Study.FK} = ?", arrayOf(exp_id.toString()))
//db.delete(ObservationUnitAttribute.tableName, "${Study.FK} = ?", arrayOf(exp_id.toString()))
db.update(Observation.tableName, contentValuesOf(Study.FK to Integer.parseInt("-$exp_id")), "${Study.FK} = ?", arrayOf(exp_id.toString()))
db.delete(Study.tableName, "${Study.PK} = ?", arrayOf(exp_id.toString()))
db.rawQuery("PRAGMA foreign_keys=ON", null)
Expand Down

0 comments on commit c68add4

Please sign in to comment.