Don't join users table when adding / removing videos from playlist.

This commit is contained in:
Kavin 2022-11-17 01:53:48 +00:00
parent 8e8c5a4143
commit e4c7ff1333
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -224,7 +224,6 @@ public class AuthPlaylistHandlers {
var query = cb.createQuery(me.kavin.piped.utils.obj.db.Playlist.class);
var root = query.from(me.kavin.piped.utils.obj.db.Playlist.class);
root.fetch("videos", JoinType.LEFT);
root.fetch("owner", JoinType.LEFT);
query.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId)));
var playlist = s.createQuery(query).uniqueResult();
@ -280,7 +279,6 @@ public class AuthPlaylistHandlers {
var query = cb.createQuery(me.kavin.piped.utils.obj.db.Playlist.class);
var root = query.from(me.kavin.piped.utils.obj.db.Playlist.class);
root.fetch("videos", JoinType.LEFT);
root.fetch("owner", JoinType.LEFT);
query.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId)));
var playlist = s.createQuery(query).uniqueResult();