From 4fa9ae48a9483be1b46616c3055f2eddd856b424 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Tue, 10 Dec 2019 11:19:38 -0600 Subject: [PATCH] Update tag filter query --- app/src/main/java/com/todoroo/astrid/api/TagFilter.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/todoroo/astrid/api/TagFilter.java b/app/src/main/java/com/todoroo/astrid/api/TagFilter.java index 722c759dd..e74e9e316 100644 --- a/app/src/main/java/com/todoroo/astrid/api/TagFilter.java +++ b/app/src/main/java/com/todoroo/astrid/api/TagFilter.java @@ -4,7 +4,6 @@ import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; import com.todoroo.andlib.sql.Criterion; -import com.todoroo.andlib.sql.Field; import com.todoroo.andlib.sql.Join; import com.todoroo.andlib.sql.QueryTemplate; import com.todoroo.astrid.dao.TaskDao; @@ -51,10 +50,8 @@ public class TagFilter extends Filter { private static QueryTemplate queryTemplate(String uuid) { return new QueryTemplate() - .join(Join.inner(Tag.TABLE.as("mtags"), Task.UUID.eq(Field.field("mtags.task_uid")))) - .where( - Criterion.and( - Field.field("mtags.tag_uid").eq(uuid), TaskDao.TaskCriteria.activeAndVisible())); + .join(Join.inner(Tag.TABLE, Task.ID.eq(Tag.TASK))) + .where(Criterion.and(Tag.TAG_UID.eq(uuid), TaskDao.TaskCriteria.activeAndVisible())); } private static Map getValuesForNewTask(TagData tagData) {