updated query to get collections referenced in the subscribers table

(cherry picked from commit c5989c65bb)
This commit is contained in:
nwoodward
2024-04-05 14:22:23 -05:00
committed by github-actions[bot]
parent 8205c07586
commit d6f6444f58

View File

@@ -159,7 +159,8 @@ public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> imple
@Override
public List<Collection> findCollectionsWithSubscribers(Context context) throws SQLException {
return list(createQuery(context, "SELECT DISTINCT col FROM Subscription s join s.collection col"));
return list(createQuery(context, "SELECT c FROM Collection c JOIN Subscription s ON c.id = " +
"s.dSpaceObject"));
}
@Override