fix posts not showing up in bookmarks
This commit is contained in:
parent
30bc3b612a
commit
2ce2580e8e
|
@ -155,13 +155,13 @@ const relationClause = (type) => {
|
|||
clause += ' FROM "Item" JOIN "Item" root ON "Item"."rootId" = root.id LEFT JOIN "Sub" ON "Sub"."name" = root."subName" '
|
||||
break
|
||||
case 'bookmarks':
|
||||
clause += ' FROM "Item" JOIN "Item" root ON "Item"."rootId" = root.id JOIN "Bookmark" ON "Bookmark"."itemId" = "Item"."id" LEFT JOIN "Sub" ON "Sub"."name" = root."subName" '
|
||||
clause += ' FROM "Item" JOIN "Bookmark" ON "Bookmark"."itemId" = "Item"."id" LEFT JOIN "Item" root ON "Item"."rootId" = root.id LEFT JOIN "Sub" ON "Sub"."name" = COALESCE(root."subName", "Item"."subName") '
|
||||
break
|
||||
case 'outlawed':
|
||||
case 'borderland':
|
||||
case 'freebies':
|
||||
case 'all':
|
||||
clause += ' FROM "Item" LEFT JOIN "Item" root ON "Item"."rootId" = root.id LEFT JOIN "Sub" ON "Sub"."name" = root."subName" '
|
||||
clause += ' FROM "Item" LEFT JOIN "Item" root ON "Item"."rootId" = root.id LEFT JOIN "Sub" ON "Sub"."name" = COALESCE(root."subName", "Item"."subName") '
|
||||
break
|
||||
default:
|
||||
clause += ' FROM "Item" LEFT JOIN "Sub" ON "Sub"."name" = "Item"."subName" '
|
||||
|
|
Loading…
Reference in New Issue