Input Reference Set Selector - implementation? Where the data is stored? How to access?

0
In documentation, there is some basic info: https://docs.mendix.com/refguide/input-reference-set-selector/. There is a nice example how we can choose in which Group a Customer belongs to. We set that a Customer belongs to Customer_Group/Group/Name. My question is, where is stored this information? For example information that the customer "John Doe" belongs to group "My group"? I understand that this is not stored in attributes of Customer or Group entities. I think there is a hidden link table (the association) between Customer and Group (there should be 2 columns with customer id and group id) and the information is stored in this way. Is it right? What if later I need to access this information somewhere, for example in microflow, how would I access it? Are we able to pull it from Customer_Group association? I would imagine if Customer is a parameter passed to my microflow, I could Retrieve a list of Groups that the Customer belongs to through Customer_Group. Do I understand all of this right?
asked
3 answers
3

In the background, Mendix always uses an extra table to store the associations. So for instance, if you have an association between Order and Customer, you'll always have a third table that stores the associations. You can see this if you open a database explorer (e.g. PgAdmin) as you'll be able to traverse the path between the tables via that third table.

answered
1

Hi Lukás,

Yes, you understand it. The Example with the Customer Parameter and then to Retrieve the List of Groups associated to the Customer is absolutely right. 

 

A nice widget to set the reference and to let the User search for groups

https://marketplace.mendix.com/link/component/2695

 

Best Regards,

answered
0

Thank you Eline and Damir! Regarding the PgAdmin (I like Valentina btw), I understand you can use it if the underlying database is set to PostgreSQL but if we use just the built-in database which is HSQL I believe, we can not use it so we actually can not see link tables, right?

answered