Referencing Associations in Specializations

0
Hi… I have the following entity model: Party is a universal entity for any type of organization or person. - PartyCompany and PartyPerson are both specializations of Party. PartyXParty enables any kind of M:M association. - CompanyXCompany and PersonXPerson are both specializations of PartyXParty – both the generalization and the specialization association entities all have attributes that need to be exposed in data grids and forms.   Context The following page uses PersonXPerson as the data source and I can easily drill down to the PersonXPerson association entity.       What I’m Trying to Do… Create a microflow to open a page based on PartyPerson, such that I can maintain the respective PartyPerson entities referenced in the page based on PersonXPerson association.   Issue Accessing the respective entity specializations (e.g. PartyPerson) referenced by the PersonXPerson association seems easy enough. But in a microflow that accesses the same PersonXPerson association, Mx doesn’t seem to be able to resolve the same PartyPerson specialization that it was able to do in the page (that calls the microflow).   If I use the PartyXParty_Party_Parent (or Child) associations listed as the available associations, then I can’t open a page based on PartyPerson.    Question Is there any way to navigate to the PartyPerson specialization in the microflow. I’m kind of stumped as to why i can easily access it in a page, but not in a microflow. If I have to create unique associations for each possible relationship between specializations (e.g. Company-Company, Company-Person, Person-Person, etc), my domain model is going to get overly complex.   Thanks!
asked
2 answers
3

Hi,

Yes. You can do that in a microflow using an Inheritance Split (green diamond shape). Retrieve the generalization object, then use an inheritance split, followed by a cast activity.  Refer to the link below for more details about it:

https://docs.mendix.com/refguide/inheritance-split

Hope this helps. Let me know in a comment if you need more clarification.

answered
0

Looking at what you are trying to accomplish, your domain contains far more entities than need be:

That's all you need (Guess you already figured out that for a parent-child relation you need only one self-reference). Now if you generate the pages for Person, you will see the ‘input Reference set selector’ for the Person's parents. To also see the children you do need to add grid that retrieves them:

 

 

 

answered