diff --git a/pkg/sqlite/table.go b/pkg/sqlite/table.go index 8d72bdcae..80d6b718a 100644 --- a/pkg/sqlite/table.go +++ b/pkg/sqlite/table.go @@ -167,7 +167,9 @@ func (t *joinTable) invert() *joinTable { table: t.table.table, idColumn: t.fkColumn, }, - fkColumn: t.table.idColumn, + fkColumn: t.table.idColumn, + foreignTable: t.foreignTable, + orderBy: t.orderBy, } } diff --git a/pkg/sqlite/tables.go b/pkg/sqlite/tables.go index 74a5ebe69..481c4ee06 100644 --- a/pkg/sqlite/tables.go +++ b/pkg/sqlite/tables.go @@ -333,7 +333,9 @@ var ( table: tagRelationsJoinTable, idColumn: tagRelationsJoinTable.Col(tagChildIDColumn), }, - fkColumn: tagRelationsJoinTable.Col(tagParentIDColumn), + fkColumn: tagRelationsJoinTable.Col(tagParentIDColumn), + foreignTable: tagTableMgr, + orderBy: tagTableMgr.table.Col("name").Asc(), } tagsChildTagsTableMgr = *tagsParentTagsTableMgr.invert()