We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca4f145 commit 032b9b7Copy full SHA for 032b9b7
1 file changed
app/src/org/gnucash/android/db/AccountsDbAdapter.java
@@ -281,7 +281,11 @@ public boolean destructiveDeleteAccount(long rowId){
281
}
282
//delete splits in this account
283
mDb.delete(SplitEntry.TABLE_NAME,
284
- SplitEntry.COLUMN_ACCOUNT_UID + "=?",
+ SplitEntry.COLUMN_TRANSACTION_UID + " IN ( SELECT DISTINCT "
285
+ + TransactionEntry.TABLE_NAME + "_" + TransactionEntry.COLUMN_UID
286
+ + " FROM trans_split_acct WHERE "
287
+ + AccountEntry.TABLE_NAME + "_" + AccountEntry.COLUMN_UID
288
+ + " = ? )",
289
new String[]{getAccountUID(rowId)});
290
deleteRecord(AccountEntry.TABLE_NAME, rowId);
291
mDb.setTransactionSuccessful();
0 commit comments