From 7c087d82b372fd43ff0162aa2ed6754492f06196 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 4 Jul 2022 08:37:52 +0100 Subject: [PATCH] Fetch user table as left join. (#304) --- src/main/java/me/kavin/piped/utils/ResponseHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/ResponseHelper.java b/src/main/java/me/kavin/piped/utils/ResponseHelper.java index b31bc3a..2e7e556 100644 --- a/src/main/java/me/kavin/piped/utils/ResponseHelper.java +++ b/src/main/java/me/kavin/piped/utils/ResponseHelper.java @@ -335,7 +335,7 @@ public class ResponseHelper { var root = cq.from(me.kavin.piped.utils.obj.db.Playlist.class); root.fetch("videos", JoinType.LEFT) .fetch("channel", JoinType.LEFT); - root.fetch("owner", JoinType.INNER); + root.fetch("owner", JoinType.LEFT); cq.select(root); cq.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId))); var query = s.createQuery(cq); @@ -435,7 +435,7 @@ public class ResponseHelper { var root = cq.from(me.kavin.piped.utils.obj.db.Playlist.class); root.fetch("videos", JoinType.LEFT) .fetch("channel", JoinType.LEFT); - root.fetch("owner", JoinType.INNER); + root.fetch("owner", JoinType.LEFT); cq.select(root); cq.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId))); var query = s.createQuery(cq);