Skip to content

fix: only fetch relationshipts once in getList

Frank Bessou requested to merge topic/default/relations-in-getlist into branch/default

When an entitytype A has a relation rel with several target entity types (B and C) and when retrieving a list of A, the generated RQL looked like:

Any
    X, GROUP_CONCAT(Y), GROUP_CONCAT(Z) GROUPBY X
WHERE
    X rel Y,
    X rel Z

This lead to false results and performance issues. Lets assume that the relation has the same definition for several targets and generate the following RQL instead:

Any
    X, GROUP_CONCAT(Y) GROUPBY X
WHERE
    X rel Y,

Merge request reports