Exclude from join by tag uuid instead of name

pull/437/head
Alex Baker 8 years ago
parent 51152c5522
commit f73ac45b2d

@ -138,4 +138,8 @@ public class TagViewFragment extends TaskListFragment {
public void inject(FragmentComponent component) { public void inject(FragmentComponent component) {
component.inject(this); component.inject(this);
} }
public TagData getTagData() {
return tagData;
}
} }

@ -597,7 +597,8 @@ public class TaskListFragment extends InjectingListFragment implements
Task.ID.eq(Field.field(TAGS_METADATA_JOIN + "." + Metadata.TASK.name))); Task.ID.eq(Field.field(TAGS_METADATA_JOIN + "." + Metadata.TASK.name)));
if (this instanceof TagViewFragment) { if (this instanceof TagViewFragment) {
tagsJoinCriterion = Criterion.and(tagsJoinCriterion, Field.field(TAGS_METADATA_JOIN + "." + TaskToTagMetadata.TAG_NAME.name).neq(filter.listingTitle)); String uuid = ((TagViewFragment) this).getTagData().getUuid();
tagsJoinCriterion = Criterion.and(tagsJoinCriterion, Field.field(TAGS_METADATA_JOIN + "." + TaskToTagMetadata.TAG_UUID.name).neq(uuid));
} }
// TODO: For now, we'll modify the query to join and include the things like tag data here. // TODO: For now, we'll modify the query to join and include the things like tag data here.

Loading…
Cancel
Save