mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Merge pull request #443 from TeamPiped/playlist-owner-fetch
Don't join users table when adding / removing videos from playlist
This commit is contained in:
commit
d0cdec5b72
1 changed files with 0 additions and 2 deletions
|
@ -224,7 +224,6 @@ public class AuthPlaylistHandlers {
|
||||||
var query = cb.createQuery(me.kavin.piped.utils.obj.db.Playlist.class);
|
var query = cb.createQuery(me.kavin.piped.utils.obj.db.Playlist.class);
|
||||||
var root = query.from(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("videos", JoinType.LEFT);
|
||||||
root.fetch("owner", JoinType.LEFT);
|
|
||||||
query.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId)));
|
query.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId)));
|
||||||
var playlist = s.createQuery(query).uniqueResult();
|
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 query = cb.createQuery(me.kavin.piped.utils.obj.db.Playlist.class);
|
||||||
var root = query.from(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("videos", JoinType.LEFT);
|
||||||
root.fetch("owner", JoinType.LEFT);
|
|
||||||
query.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId)));
|
query.where(cb.equal(root.get("playlist_id"), UUID.fromString(playlistId)));
|
||||||
var playlist = s.createQuery(query).uniqueResult();
|
var playlist = s.createQuery(query).uniqueResult();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue