Query fixes

This commit is contained in:
M66B
2019-06-27 09:43:03 +02:00
parent 9e6d9903c0
commit 898e7bccf3
2 changed files with 14 additions and 14 deletions

View File

@@ -62,7 +62,7 @@ public interface DaoAccount {
" FROM account" +
" LEFT JOIN folder AS drafts ON drafts.account = account.id" +
" WHERE :all OR account.synchronize" +
" AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
" AND (drafts.type = '" + EntityFolder.DRAFTS + "' OR drafts.type IS NULL)" +
" GROUP BY account.id" +
" ORDER BY CASE WHEN :all THEN 0 ELSE account.`order` END" +
", CASE WHEN :all THEN 0 ELSE account.`primary` END DESC" +