Relationships

0
When you drag a line between entities the system creates a relationship. As I understand it, the system adds a relationship attribute to each entity (e.g. EntityA_EntityB) which can be seen when you generate overview pages. If the entities are already populated with data, is there an easy way to populate the relationship attributes? (A check box would be a nice enhancement...) Or do I have to write something to loop through and populate that attribute in each entity?
asked
2 answers
0

Hi Bill,

This depends a bit on your use case and what which way the association (relationship) goes. 
A couple of tips:

- If the data is based on user input you can add a reference selector(or different UI) to a page so that the user can populate the assocation
- If you are doing some sort of processing microflow then you can indeed loop over 1 side of the entities and associate them to the correct other entity. Depending on what the association is 1-1, 1-* or *-* , you can determine which entity to loop over.

Setting the association in a microflow is nothing more then a change activity and set the association EntityA_EntityB with object $EntityB for example.

Hope this helps!

answered
1

Hi Bill,
There is no such feature in Mendix, but that’s exactly why the Migration module :exist : https://marketplace.mendix.com/link/component/120423

Cheers,
F

answered