updated query to get collections referenced in the subscribers table

This commit is contained in:
nwoodward
2024-04-05 14:22:23 -05:00
parent 815f2c1fbc
commit c5989c65bb

View File

@@ -159,7 +159,8 @@ public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> imple
@Override @Override
public List<Collection> findCollectionsWithSubscribers(Context context) throws SQLException { 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 @Override