mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
Merge pull request #1191 from atmire/DS-2916
DS-2916 BitstreamDAOImpl contains incorrect database linking
This commit is contained in:
@@ -77,8 +77,7 @@ public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> impleme
|
||||
public Iterator<Bitstream> findByCommunity(Context context, Community community) throws SQLException {
|
||||
Query query = createQuery(context, "select b from Bitstream b " +
|
||||
"join b.bundles bitBundles " +
|
||||
"join bitBundles.bundle bundle " +
|
||||
"join bundle.items item " +
|
||||
"join bitBundles.items item " +
|
||||
"join item.collections itemColl " +
|
||||
"join itemColl.communities community " +
|
||||
"WHERE :community IN community");
|
||||
@@ -92,8 +91,7 @@ public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> impleme
|
||||
public Iterator<Bitstream> findByCollection(Context context, Collection collection) throws SQLException {
|
||||
Query query = createQuery(context, "select b from Bitstream b " +
|
||||
"join b.bundles bitBundles " +
|
||||
"join bitBundles.bundle bundle " +
|
||||
"join bundle.items item " +
|
||||
"join bitBundles.items item " +
|
||||
"join item.collections c " +
|
||||
"WHERE :collection IN c");
|
||||
|
||||
@@ -106,8 +104,7 @@ public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> impleme
|
||||
public Iterator<Bitstream> findByItem(Context context, Item item) throws SQLException {
|
||||
Query query = createQuery(context, "select b from Bitstream b " +
|
||||
"join b.bundles bitBundles " +
|
||||
"join bitBundles.bundle bundle " +
|
||||
"join bundle.items item " +
|
||||
"join bitBundles.items item " +
|
||||
"WHERE :item IN item");
|
||||
|
||||
query.setParameter("item", item);
|
||||
|
Reference in New Issue
Block a user