Related Entities with non-direct relationship

Hello!

We made an implementation for related entities really similar to the one in the online demo.
It is working fine when the relationship is direct (one-to-many, etc)

We need now to show a related entity which is related with our entity trough more than one entity.

Lets say, entity A is a one to Many with B, but let’s say entity D is connected-related with A trough C, because C and D are directly related and C is directly related with B.

Relations:
A -> B
B->C
C -> D

And we want to show in A screen the relation with D or vice-versa in the Lookup field
I hope i was clear.
Which will be the best approach to accomplish this using the related entitys views ? With a transient list for example?

Thanks!

Hi,

Currently, RelatedEntities component does not support deep relations. I think we could implement it, so I’ve created an issue PL-8763. Please note that it is not yet included to the next minor release.

As a workaround I recommend that you create an additional browse screen with a collection datasource that will use screen parameter to show related records using hard coded query that will use that parameter. You can open that screen using usual Button and pass selected rows from a Table to that screen.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-8763