Limit identities to accounts with a drafts folder

This commit is contained in:
M66B
2019-01-25 19:27:23 +00:00
parent f2d76246f3
commit d3919e2b5b
2 changed files with 4 additions and 3 deletions

View File

@@ -36,8 +36,9 @@ public interface DaoIdentity {
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN account ON account.id = identity.account" +
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE NOT :synchronize OR account.synchronize")
List<TupleIdentityEx> getIdentities(boolean synchronize);
List<TupleIdentityEx> getComposableIdentities(boolean synchronize);
@Query("SELECT * FROM identity WHERE account = :account")
List<EntityIdentity> getIdentities(long account);