Hi team,
I have an example of a DnoContract document model and CyberContract document model, both of them are modeled with CDM. Now I would like an heterogeneous overview to display both products and from the overview I can choose which product I want to create new entry.
I tried modeling this on a12 version 2022.06 ext #5 but it did not work.
Do you know how can I model this?
or it is not supported yet with a12? if so I would love to know if there is already discussion to implement this in the future..
Thanks.
Hi,
independent of whether or not this might work, I wonder what your intention is.
Conceptually, non-CDM document models are used to describe a domain entity.
CDMs, however, are used to describe a view on a number of domain entities that are related via relationship models.
The CDM itself is never the single representation of a domain entity! It is based on a single entity (that can have subtypes) and adds further entities via relationships.
That’s why I think that the heterogeneity feature should only be used with non-CDM document models since the subtype relationship is a property of domain entities, but it is not a property of views.
For your specific case:
I would model this as follows:
Document models: Contract (abstract), DnoContract (subtype of Contract), CyberContract (subtype of Contract)
CDMs: DnoContractCDM, CyberContractCDM
The overview must be based on the abstract Contract model for heterogeneity. Unfortunately, I think you currently cannot use a CDM here.
For the form you can then use the CDM of the respective contract type that was selected.
Hi,
My problem is I would like to open the CDM form UI when clicking on Add button in the heterogeneous overview of Contract. This is not possible if I have subtype as non-CDM models …
Hi,
Following Eriks comment, I think you might end up with a wierd / counter-intuitive UI, but to answer your concrete question:
You can customize or even completely replace the (very generic) default variant selection.
https://docs.geta12.com/docs/?release=2023.02#product:client,artifact:client-documentation-bundle,content:asciidoc,scene:Client,anchor:_variant_selection_mapper