Configurable entities and the relation schema

66 views
Skip to first unread message

Alfeu Uzai Tavares

unread,
Oct 16, 2024, 10:42:29 AM10/16/24
to DSpace Technical Support
Hello!

When creating new entities and/or relationships, is it necessary to manually add the new relationships in the relation schema?

For example, we added a new relationship between Publication and Person, creating the isAdvisorOfPublication and isPublicationOfAdvisor relationships.

We also configured discovery.xml, and in the front-end added it to the related entities search in our custom person component.

However, no related publications were being displayed..
Inspecting the logs I've found some errors regarding the missing metadata relation.isPublicationOfAdvisor and relation.isPublicationOfAdvisor.latestForDsicovery.
After adding them to the relation schema, removing and re-adding the relationships, the related publications started to show.

Is this the correct approach or there is there some way to automatically update the relation schema when adding new entities and/or relationships?

<ds-tabbed-related-entities-search
[item]="object"
[relationTypes]="[
{
label: 'isAuthorOfPublication',
filter: 'isAuthorOfPublication',
configuration: 'default-relationships'
},
{
label: 'isAdvisorOfPublication',
filter: 'isAdvisorOfPublication',
configuration: 'default-relationships'
},
]"
>

Peter Sutton-Long

unread,
Oct 17, 2024, 10:10:29 AM10/17/24
to DSpace Technical Support
Hi Alfeu,

We've had the same experience and took the same approach as you - manually adding those fields to the metadata register. We didn't find a way of automatically updating the metadata schema but I'd be interested to know if that is something that should be happening.

Kind regards,

Peter

Alfeu Uzai Tavares

unread,
Oct 17, 2024, 3:22:28 PM10/17/24
to Peter Sutton-Long, DSpace Technical Support
Hi all,

I ended up creating a custom script (extending DSpaceRunnable) to update the relation schema based on the contents of the 'relationship_types' table.
If there is currently no way to update the schema automatically, I can modify the script (remove things specific to our use case) and share it here.

Best regards,
Alfeu U. Tavares


--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/c3a72adb-0fb0-417c-b5bd-9c3c7120f302n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages