0

I am doing dspace search project. Here I have created seperate item page. Now I have one problem. I am not able to retrieve collection name in in which item appears. Collection2item displays only collection id.Please help.

schweerelos
  • 2,189
  • 2
  • 17
  • 25
Savio menezes
  • 140
  • 1
  • 11

2 Answers2

1

The collection name is stored in the collection table. It is linked to the item table via item.owning_collection and collection2item.

select collection.name 
from collection 
inner join item on owning_collection=collection_id
where item_id=1
spongebob
  • 8,370
  • 15
  • 50
  • 83
terrywb
  • 3,740
  • 3
  • 25
  • 50
1

Savio, thank you for clarifying that you are in DSpace 5.

The following code appears to document the migration of community.name from DSpace 4 to DSpace 5.

https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V5.0_2014.09.26__DS-1582_Metadata_For_All_Objects.sql#L133-L141

DSpace 5 introduced "metadata for all objects" and collection.name appears to be stored as a metadatavalue of "title".

terrywb
  • 3,740
  • 3
  • 25
  • 50