Multi root groups, heterogenity and relationships

There are Document Models named Master, Super, Sub1 and Sub2. Sub1 and Sub2 are subtypes of Super. First relationship is between Master and Sub1 (1:n), and second ist Master to Sub2 (1:n).
Sub1 and Sub2 are taxmodels, which have each multiple root groups. In both Sub-Models the Super document is included as described in the documentation as include-groups.
When I try to generate documents the genereated document model contains the error: The included model may only contain a single, non-repeatable group at top level.
My question ist why? You support a multi-root-approach. I do not onderstand, why it is a problem to have multiple root groups in the target document model. I do understand why it is not supported with normal includes, but in relationships? why not?

Hi @bjoern-dark-ice,

Currently, it is not possible to create relationships between document models that have multiple root groups. There are technical and design problems with multiple root groups which should be addressed in A12-16741. Please add your perspective to the ticket.

This answer is valid for A12 2022.06 - 2024.06

What is the url of the ticket? Which ticket system do you refer to?

HI @bjoern-dark-ice,

This is A12 internal ticketing system. I will try to explain the issue.

The generated models needed for relationships are created by a kernel feature called include resolution (target and link document models are included into the generated model). This mechanism does not allow including document models with multiple root groups because the included root should replace the source group in the generated model. If there are multiple roots, the structure requires an additional group single root group. If you are fine with including a single root group to the document models, you will bypass this problem.

The ticket, I have mentioned, was created to remove these generated models from the A12 environment and thus making it possible to create relationships between documents with multiple root groups.

Hey @bjoern-dark-ice, the mentioned Ticket from @tomas-thin-gale is now done and will come with the 2024.06-ext4 release. With this change, the generated models will be dropped, and therefore it will be possible to create relationships between documents with multiple root groups.