What is the meaning of the arrow in the association?

4
The associations always have a white arrow in them, could someone please tell me what the meaning of that arrow is? Thanks! Chris
asked
2 answers
6

The pointer (arrow) points to the object where the relation (the key / foreign key) is saved (in contrast to ERD). When you have a 1-0 relation between customer and car, the car doesn't 'know' to wich customer he belongs. The pointer point to the customer object, so the customer knows witch car is connected. So the pointer is always on the end of the 1 of N in the 1-0 of N-0 relation. When you're using 1-1 relations, you shall see that there is an arrow on both ends.

And this is affect your user interface design. You can only use reference related widgets (such as reference selector) in a dataview which holds the relation information (where the pointer points to, the customer). So in the case of customer and car, you can select the car by a reference selector in a customer dataview but not vice versa.

If interested, hier how it technallicy work (not for Mendix):
Normally it makes difference for database architecture if you're using a 1-0 relation of a 1-1 relation between customer and car. In the first case you have to add a foreign key to customer, but in the last case you have to add both a foreign key to customer and to the car table. But Mendix creates for each relation a pairtable (for scalability e.t.c.). So your database architecture isn't different when you're using 1-1 of 1-0 relations.

answered
1

The point of the arrow is the parent of the association, the other end is the child of the association.

So basically: child --> parent (0->1 or 0->N)) And in case both own the association: parent1 <-> parent2 (the modeler still names them parent and child however, as this is hard coded) (1->N or N->M)

A parent can use a reference (set) selector to select 1 (or more) child(ren), not vice versa.

answered