Identities will only synchronize of account is synchronizing

This commit is contained in:
M66B
2018-08-16 14:53:05 +00:00
parent dfc30a8436
commit bed0bd84c1

View File

@@ -33,7 +33,10 @@ public interface DaoIdentity {
" JOIN account ON account.id = identity.account")
LiveData<List<TupleIdentityEx>> liveIdentities();
@Query("SELECT * FROM identity WHERE synchronize = :synchronize")
@Query("SELECT identity.* FROM identity" +
" JOIN account ON account.id = identity.account" +
" WHERE account.synchronize = :synchronize" +
" AND identity.synchronize = :synchronize")
LiveData<List<EntityIdentity>> liveIdentities(boolean synchronize);
@Query("SELECT * FROM identity")