Hi,
we have the following data model:
We’re aiming to create a SGEntity-CDM to display and manage information about SGEntity, Person and MasterContract.
The DM looks like this:
However, on the overview, we can see not only SGEntity documents, but also Company documents:
This is happening because we’re using a relationship Company-Person-RM as shown in the DM structure. After removing that relationship from SGEntity-CDM-DM we can only see SGEntity documents. But it’s not a solution - we need to maintain this relationship, but only display SGEntity documents.
Hi @i.pogorzala,
would it be possible to model a further relationship, SGEntity-Person-RM?
That way, the supertype, Company-DM would never be referenced.
@mcaemmerer
While this would fix the problem for this screen, it would create other problems throughout the application, where we use the Company-Person-RM for use cases concerning both SGEntity and regular Company and we’d have to maintain both there.
I thought this would be the case. Unfortunately, if you cannot create a separate relationship or reorganize the heterogeneity, then there is no modeling solution for this problem.
If you have a field which shows if the document is an SGEntity or a Company, you can filter the options manually in the overview. Otherwise, you will need to speak to a developer to filter out the documents which do not have the correct subtype.
@malcolm-silver-ice
speak to a developer to filter out the documents which do not have the correct subtype.
Any idea how to achieve this?
I don’t, but the moderators are already on the case 
What is considered to be the root of the CDM? Contract? Then the CDM should have links Contract->SGEntity->Person. Person should be nested in the SGEntity.
If there will be just SGEntity and not Company or Legal entity in the Contract->SGEntity link, then no other documents than SGEntity should be returned.
For Company, Companies and SGEntities will be returned, but for SGEntity just SGEntities. Paren implies children but not the other way around.
REgarding your CDM - why is LegalEntity in the top, but not SGEntity?
@petr-high-peak
What is considered to be the root of the CDM? Contract?
The root as specified in cdm.queryRoot is SGEntity-DM.
REgarding your CDM - why is LegalEntity in the top, but not SGEntity?
LegalEntity is a root group of all: SGEntity-DM, Company-DM and LegalEntity-DM
So, if I understand it properly, you need SGEntites with their persons and contracts.
Then the CDM with root model of SGEntity should work. It shouldn’t allow Companies or LegalEntities.
I’m confused by the LegalEntity in the picture - I’d expect SGEntity there.
If the root model is LegalEntity, all its child types will be displayed too.
@petr-high-peak
Then the CDM with root model of SGEntity should work. It shouldn’t allow Companies or LegalEntities.
That would also seem to me like the expected behaviour, but unfortunately, as I mentioned in the first post, due to the Company-Person-RM relationship included in the CDM, Companies are also displayed.
@i.pogorzala - Could you, please, create a ticket for Data Services with models attached? We will investigate the behavior and check whether there is a bug or will try to help you with your problem.
Hi @i.pogorzala,
you can create a ticket to report this potential issue in the A12 Support Portal here.
Hey @i.pogorzala, thanks for providing the [Support Portal Ticket]<INTERNAL_LINK> as discussed - there you can keep track and you will get further updates to your request. I also derived the ticket A12-15238 for our internal use and handed it over to our development team. We keep you updated!
Update: Data Services wasn’t able to reproduce this issue and we received feedback that the case has been remodeled in a different way. We’ve therefore closed the mentioned A12 ticket + the discourse thread and marked this topic as done