Bundle table - Primary_bitstream_id and Bundle_id are null

19 views
Skip to first unread message

Tianyi Gu

unread,
Aug 29, 2022, 4:52:42 PM8/29/22
to DSpace Community
Hello everyone,

I installed the DSpace docker and ingested entity test data.

I was trying to figure out how items connect with bitstream in one query.
But I found Primary_bitstream_id and  Bundle_id were null values. 

Please advise.

Thank you,
Tianyi
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
    

Tianyi Gu

unread,
Aug 30, 2022, 8:21:57 AM8/30/22
to DSpace Community

I found out that the query was required to go from item:

dspaceobject -> item -> item2bundle -> bundle -> bundle2bitstream -> bitstream


SELECT * FROM bitstream as z JOIN
(select bitstream_id from bundle2bitstream as b2b JOIN
(select a.bundle_id from item2bundle a JOIN item b ON a.item_id=b.uuid
where b.uuid = '4e203020-8fd6-406a-addc-f4f08365b662') as i2b
ON b2b.bundle_id =i2b.bundle_id) as y
ON z.uuid= y.bitstream_id
Reply all
Reply to author
Forward
0 new messages