Skip to content

Entities relations with invalid associations shown #1387

@paulo-graca

Description

@paulo-graca

Describe the bug
My model has two relation types, with same relation name, but involving different entities:

	<type>
		<leftType>Publication</leftType>
		<rightType>Person</rightType>
		<leftwardType>isAuthorOfPublication</leftwardType>
		<rightwardType>isPublicationOfAuthor</rightwardType>
		<leftCardinality>
			<min>0</min>
		</leftCardinality>
		<rightCardinality>
			<min>0</min>
		</rightCardinality>
	</type>
	<type>
		<leftType>Publication</leftType>
		<rightType>OrgUnit</rightType>
		<leftwardType>isAuthorOfPublication</leftwardType>
		<rightwardType>isPublicationOfAuthor</rightwardType>
		<leftCardinality>
			<min>0</min>
		</leftCardinality>
		<rightCardinality>
			<min>0</min>
		</rightCardinality>
	</type>

But when I try to associate a Person as an author, that Person, will be shown simultaneously as Authors (persons) relation and Authors (organizational units)

To Reproduce
Steps to reproduce the behavior:

  1. You can use /dspace/config/entities/openaire4-relationships.xml as your model
  2. And set dspace.​entity.​type = Publication to any existing Item
  3. At edit item Relationships separator, use lookup to associate an author
  4. After you added the relations to that entity, strange associations will be shown
    image

And if you refresh the page, you will get 2 associations:
image

It seems an issue with Relationships separator, because item page is shown as expected.

Expected behavior
I was expecting to have only one association, or to be shown only one Authors (persons) relation.

Metadata

Metadata

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions