Several conceptual relationships to the same entity
This page finishes the example of Derive a one-to-many conceptual relationship with addresses.
Billing address and delivery address
An order has a billing address and a delivery address, so the Order entity is linked twice to the Address entity, with cardinality 1 on the Address side. With the standard pattern, both foreign key attributes would be named Address_id.

When two generated attributes of the child entity would have the same name, Hackolade Studio replaces the entity name in the generated name:
- by the role of the parent entity, when you defined one on the relationship,
- otherwise, by the name of the relationship.
In our example, the roles are set on the Address side of each relationship:


With the roles "billing address" and "delivery address", the attributes added to the Order entity are billing address_id and delivery address_id. Both attributes are renamed, not only the second one, so the result is the same at each derivation. The same rule applies when the child entity already contains an attribute with the generated name.
With the naming conventions of the PostgreSQL model, they become billing_address_id and delivery_address_id:

Tip
Defining roles on such relationships gives you readable names, and saves a manual rename after each derivation.