Revert "Revert distinct from criteria. (#308)"

This reverts commit bcb0d32daa.
This commit is contained in:
Kavin 2022-07-17 19:44:56 +05:30 committed by GitHub
parent c7a0535039
commit f37682cf4e

View file

@ -864,7 +864,6 @@ public class ResponseHelper {
// Get all videos from subscribed channels, with channel info // Get all videos from subscribed channels, with channel info
CriteriaQuery<Video> criteria = cb.createQuery(Video.class); CriteriaQuery<Video> criteria = cb.createQuery(Video.class);
criteria.distinct(true);
var root = criteria.from(Video.class); var root = criteria.from(Video.class);
var userRoot = criteria.from(User.class); var userRoot = criteria.from(User.class);
root.fetch("channel", JoinType.INNER); root.fetch("channel", JoinType.INNER);
@ -916,7 +915,6 @@ public class ResponseHelper {
// Get all videos from subscribed channels, with channel info // Get all videos from subscribed channels, with channel info
CriteriaQuery<Video> criteria = cb.createQuery(Video.class); CriteriaQuery<Video> criteria = cb.createQuery(Video.class);
criteria.distinct(true);
var root = criteria.from(Video.class); var root = criteria.from(Video.class);
var userRoot = criteria.from(User.class); var userRoot = criteria.from(User.class);
root.fetch("channel", JoinType.INNER); root.fetch("channel", JoinType.INNER);