Fix a subquery's selection type

This commit is contained in:
Kavin 2023-04-30 22:16:49 +01:00
parent 7dc0afa966
commit cb6bfb30b1
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -177,7 +177,7 @@ public class Main {
var pvQuery = cb.createCriteriaDelete(PlaylistVideo.class); var pvQuery = cb.createCriteriaDelete(PlaylistVideo.class);
var pvRoot = pvQuery.from(PlaylistVideo.class); var pvRoot = pvQuery.from(PlaylistVideo.class);
var subQuery = pvQuery.subquery(me.kavin.piped.utils.obj.db.Playlist.class); var subQuery = pvQuery.subquery(String.class);
var subRoot = subQuery.from(me.kavin.piped.utils.obj.db.Playlist.class); var subRoot = subQuery.from(me.kavin.piped.utils.obj.db.Playlist.class);
subQuery.select(subRoot.join("videos").get("id")).distinct(true); subQuery.select(subRoot.join("videos").get("id")).distinct(true);